-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON action renders template under AMD #80
Comments
Oops, that's no good :P Looks like a bug with the ActionView template handler. Please use the gem version 1.9.1 until fixed. @jimmycuadra Can you have a look at this? |
I'm investigating this, but haven't found the solution yet. For a quick, temporary fix:
I hope to have a non-hack solution soon. |
Thanks a lot for having a look and keeping us updated. |
Thanks, as @netzpirat suggested I am using 1.9.1 without issues. |
@netzpirat AFAICT a template file which does not specify a MIME type will be used for all MIME types if a MIME-type-specific template is not found. It may be necessary for templates shared between Rails and Sprockets to use the This creates a problem with Sprockets, because we'd have to register the |
Figured out how to do this by using a custom |
Thanks a lot for the nice fix @jimmycuadra! Version 1.11.0 released. |
Thanks! I've updated and all looks good. |
If I have an action in my controller like the following:
And I have a template with the same path at app/assets/javascripts/templates/patients/show.hamlc, then the server renders the template instead of json:
If I put a rabl template at app/views/patients/show.json.rabl, then it works okay.
The text was updated successfully, but these errors were encountered: