Closed darko1002001 closed 9 years ago
@darko1002001 this is cause it defaults to search for templates in the path and take the remainder; you will need to change
e.g. in your applications config:
HandlebarsAssets::Config.path_prefix = 'app/assets/javascripts/modules'
Hopefully that will work for you :) sorry about the late response.
Yeah this works thanks!
I am using Rails 4.1 and I have the following structure of the javascript files and templates:
in the application.js file i require_tree ./modules/
The issue is that i lose the prefix to the templates when inspecting the HandlebarsTemplates variable. So my template goes under the name view2 and view1 instead of modules/module1/templates/view1 for example.
I have read the documentation for requiring the templates before the javascript and that works fine if i use a single folder just for the templates but i would rather organize them inside modules.
Is there any way to achieve what i need?
I've used it like this with Rails 3 and it worked so i assume its an issue or a limitation?