Closed stravid closed 11 years ago
Hi @stravid,
Without actually trying it, this is odd to me (and duplicated -- typo?):
assets.append_path(File.join(project_root, 'app', 'assets'))
Do you really need that? It may be that the Rails sprocket gem adjusts this. Try it and let me know if that changed it. If not, I will take a look when I have some time later today?
Good catch! Unfortunately nothing changed. I would really appreciate it, if you find some time later in the day :-)
Hi @stravid,
I created a simple app that does the right thing from your code. The only difference that I can see is that I removed this line:
assets.append_path(File.join(project_root, 'app', 'assets'))
The app is just_rack. Pull it down, setup your rvm gemset, bundle, and start it:
rackup
Then point your browser to localhost:9292/assets/application.js
and this is what I see:
(function() {
this.Ember.TEMPLATES || (this.Ember.TEMPLATES = {});
this.Ember.TEMPLATES["one"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
helpers = helpers || Handlebars.helpers;
var buffer = "", stack1, foundHelper, functionType="function", escapeExpression=this.escapeExpression;
foundHelper = helpers.token;
if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); }
else { stack1 = depth0.token; stack1 = typeof stack1 === functionType ? stack1() : stack1; }
buffer += escapeExpression(stack1) + "\n";
return buffer;});
return this.Ember.TEMPLATES["one"];
}).call(this);
That seems to be what you want. Does that help?
Thanks a lot, I owe you a drink!
This solved the problem :-)
Awesome! Find me at a conference :)
Hi!
The readme states the following:
But in my little project this is not the case. Maybe I do something wrong, I would really appreciate if you could take a look.
I have a simple
config.ru
:When I require all my templates in my
application.js.coffee
with#= require_tree ./templates
I get the following output:I would love to remove the "javascripts/templates" part from the name, is this possible?
Thanks for your time and awesome gem!