I am using Ruby on Rails 4 on RubyMine 6. I have a somefile.css.scss.erb
file in app/assets/stylesheets/somefolder
. I am using SCSS and I need ERB to use asset_url helper to write paths for background properties.
The problem is that when I use both SCSS and ERB extensions I get "cannot find variable" warning everywhere I use SCSS variables(In uses but not in initializations). Is there any way to make RubyMine parse .scss.erb
files correctly?
It works fine. I'm just not comfortable with these warnings.
You don't need to do that. Just rename the file to somefile.css.scss
and use the SCSS image-url
helper.
image-url("rails.png")
is translated into
url(/assets/rails.png)