Answer the question
In order to leave comments, you need to log in
How to implement scss generation in helper?
There is a table with records. One entry is a set of css options.
Further there is a scss code into which these values are inserted.
You need to generate scss (sass) code in the helper and send it as simple css.
How to do it?
PS Why can't I write css right away? It's simple - you need sass functions.
Answer the question
In order to leave comments, you need to log in
How to write a Rails helper that will return a string processed by a third party library?
require "sass"
def foo(sass)
Sass.compile sass
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question