Closed apolzon closed 11 years ago
You're right. I think I need to redesign the way that this behaviour is being added, perhaps with something more like an after_render
filter.
Closing because template compilation will be removed with 2.0, you can use handlebars_assets or ember-rails to compile your templates.
Both the closure and precompile modules are not firing as expected. I believe I tracked it down to the evaluate_without_precompile/closure method already being defined. For precompiling, I was able to get it to work properly by changing the evaluate alias to use _with_js_precompiler, however the same hack on the closure module did not help.
Without closures (I'm pretty sure this would not fine with a closure), on page load, the HandlebarsTemplates object does not yet exist, so HandlebarsTemplates[] fails on assignment.
The handlebars_assets gem also ensures the object already exists inside their closure: