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
Just elaborating on what zgchurch wrote:
Thought it might be useful.
def with_format(format, &block) old_formats = formats begin self.formats = [format] return block.call ensure self.formats = old_formats end end