I\'m trying to generate a JSON response that includes some HTML. Thus, I have /app/views/foo/bar.json.erb:
/app/views/foo/bar.json.erb
{ someKey: \'some value\', someH
It seems that passing a formats option will render it properly in newer Rails version, at least 3.2:
formats
{ someKey: 'some value', someHTML: "<%= h render('baz', formats: :html) -%>" }