I use sass-rails and compass rails for mixins.
My site allows users to choose their own colors. A bouquet of these flowers should be launched through a mixture of sass / compass. Colors are stored in a database.
The solution I was thinking about is to dynamically define the color inside the tags in the head. Unfortunately, I cannot figure out how to get Rails to process the SASS block in the view file.
This solution does half the work. It processes sass in an external file and loads it into the view, but I have no way to pass the color to it:
<%= Rails.application.assets.find_asset('mystyle').to_s.html_safe %>
Any ideas?
source
share