Is there a way to access Ruby variables in SASS or do I need to make a custom function for it?
I am trying to create a stylesheet for each user, so in the controller I am doing something like:
def show respond_to do |format| format.css{render :partial => "styles"} end end
then in the view name _styles.haml I do this:
:sass #header :background url(user.banner.url)
Is it even possible?
* Apparently this is not the case: http://sass-lang.com/docs/yardoc/file.FAQ.html#q-ruby-code
Is there any way besides this dirty correction of the code we made (we converted _styles, partial to rhtml, then)
#header { background: #efefef url(<%= @company.settings.banner.url %>); }
is there any way for this in haml?
ruby ruby-on-rails sass haml
corroded
source share