Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : CanJS works well with the Rails asset pipeline

$
0
0
Hey lawwantsin - I've had tremendous success pre-compiling my EJS using the Rails Asset Pipeline generally following this guide:

I keep my templates in app/assets/templates/

They all get sucked up into the JST global in the Javascript environment.

I'm using CanJS, so I usually use the template like so:

var data_for_view = {};
can.view.frag(JST["some_template"].call(data_for_view));

Viewing all articles
Browse latest Browse all 3491

Latest Images

Trending Articles



Latest Images