How to use sass-rails helpers in Ruby?

2019-09-11 19:31发布

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条回答
你好瞎i
2楼-- · 2019-09-11 20:05

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.

查看更多
登录 后发表回答