Answer the question
In order to leave comments, you need to log in
How to generate javascript using the Slim templating engine?
Hello!
I'm starting to learn Rails, in a test project I use the Slim template engine.
It is required to generate the template cart.js.slim Tell me
how to generate the correct template?
If you just prescribe jquery then the template does not work.
I tried to start lines with a pair of "| " - this combination works, but if there are 2 lines in the file, then again an error.
Answer the question
In order to leave comments, you need to log in
I scored on js, renamed it to html.slim, I write each new line with a pair of "| "
Everything works as it should
Why be so perverted? Rename to js.erb and write without "|".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question