Open apolzon opened 11 years ago
Hi @apolzon,
Did you end up resolving this issue? Are you using v0.2.1?
No, I wasn't able to resolve this. I am on v0.2.1.
I ended up side-stepping the issue by re-jiggering my payload and how I was constructing the template.
Update:
I am able to render a template or partial in the app/assets/javascripts/templates directory (or, I believe, anything under app/assets or vendor/assets):
= render partial: "templates/test" # renders app/assets/templates/_test.html.haml OR = render template: "templates/test" # renders app/assets/templates/test.html.haml
However, I am still unable to render a file that resides in the app/views directory. If I have to duplicate all my content into a partial/template under app/assets, the feature has a much smaller use case.
Any ideas on how to add app/views to the lookup paths?
Hi @apolzon,
Yes, rendering only looks to the assets path currently. Check the latest pull request and see if you can find someone else to use it too :)
Not sure exactly what is going on, but I've been thus far unable to get haml_assets to properly find any partials.
My hbs template is located in app/assets/javascripts/templates/quiz/xyz.hbs.haml My html partial is located under app/views/agents/_badges.html.haml
I've tried rendering a partial like so: = render "agents/_badges.html.haml"
The thrown exception told me it was only looking in the app/assets folders, so I tried moving the _badges.html.haml file into app/assets/javascripts, also tried using relative paths in the render call, always the same results.