Hello There, I’m Aaron Miler I like to code things

About Me

I’m Aaron Miler, a Portland Oregon based Software Engineer. When I’m not behind the computer screen hacking away. You can find me bouldering, snow boarding, and running around North West Portland with my dog Helo.

I tweet things

I also write about things

Dynamic SCSS Rendering with Rails

Jun 5th, 2016

Dynamically Rendering SCSS in Rails

Recently at I came across a problem where I needed to dynamically include a stylesheet, or scss snippet depending on what kind of content I was showing. My first inclination was to use something like this:

1
2
3
4
5
6
7
8
# app/views/layouts.application.html.erb
...
<%= yield :head %>

# app/views/some_controller/some_view.html.erb
<% content_for :head do %>
  <%= stylesheet_link_tag '/path_to/stylesheet.css' %>
<% end %>
Read on →

Contacting Me

Ways to contact me