Is there a way to use vari开发者_运维知识库ables from my Ruby application inside a Sass file?
You can add .erb extention to your .sass file and then add your variables just like in regular .erb file:
<%= APP_CONFIG[:yourkey] %>
More information:
- http://guides.rubyonrails.org/asset_pipeline.html#preprocessing
- http://guides.rubyonrails.org/asset_pipeline.html#coding-links-to-assets
- http://rwilcox.tumblr.com/post/9038701675/sass-variables-and-the-rails-3-1-asset-pipeline
精彩评论