KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to generate a JSON response that includes some HTML. Thus, I have /app/views/foo/bar.json.erb : { someKey: 'some value', someHTML: "<%= h render(:partial => '/foo/baz') -%>" } I want it to render /app/views/foo/_baz.html.erb , but it will only render /app/views/foo/_baz.json.erb . Passing :format => 'html' doesn't help.
Tags (comma-separated)
Save Edits
Cancel