accessing Ruby variable(from model or controller) in SASS
- by corroded
Is there a way to access ruby variables in sass or do i have to make a custom function for it?
What im trying to do is to generate a stylesheet for each user so in the controller, i do 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 this possible at all?