M
M
Makito2012-08-01 16:02:49
JavaScript
Makito, 2012-08-01 16:02:49

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

2 answer(s)
M
Makito, 2012-08-02
@Makito

I scored on js, renamed it to html.slim, I write each new line with a pair of "| "
Everything works as it should

I
Ivan Goncharov, 2012-08-14
@SilentBrain

Why be so perverted? Rename to js.erb and write without "|".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question