How to use sass-rails helpers in Ruby?

时光毁灭记忆、已成空白 提交于 2019-12-12 01:49:32

问题


From the Github page it would seem that one can use the Sass helpers (asset_path, asset_url, image_path etc.) in Ruby but I can't figure out how.

I need to set the default_url for a Paperclip attachment and want to use one of my assets from the asset pipeline for that.


回答1:


You can use the sass helpers in SCSS files, but you cannot use them elsewhere. In those cases you need to use the regular asset_path and image_tag helpers.



来源:https://stackoverflow.com/questions/7636204/how-to-use-sass-rails-helpers-in-ruby

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!