A
A
Anton2016-06-18 21:36:38
Ruby on Rails
Anton, 2016-06-18 21:36:38

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

1 answer(s)
A
Askhat Bikmetov, 2016-06-18
@hummingbird

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

Only one question: why?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question