Can I access SASS variables from Rails classes?

In my Rails 4 application, I have several SASS variables, such as:

$primary_color: #ec4158;

Is it possible to access this variable from the Rails class?

Thanks for any help.

+3
source share
1 answer

I think you need to do it the other way around.

  • define constants in the initializer or somewhere else ( like this )
  • create your sass using erb (yourstyle.sass.erb)
  • use the same constants in shrimp generation
0
source

All Articles