You can clone with
HTTPS or Subversion.
It's currently difficult to render a partial with a different format from the current response:
render :partial => <partial>, :format => :html should work how you would expect.
render :partial => <partial>, :format => :html
This works: render :partial => <partial>, :formats => [:html]
render :partial => <partial>, :formats => [:html]
It would be more natural to specify :format => :html if you only want to specify one.
:format => :html
I am fine with :formats accepting a symbol and not an array, but for having another option just to accept a symbol.
you could do render :partial => <partial>, :formats => :html
render :partial => <partial>, :formats => :html
The problem with the formats option is that partials rendered from others will still use the current action's format.
That means it is impossible to render that renders another one.
-> post.json (this is not possible to render because the format is html)
How do you deal with it?
@dnagir I came across this too and provided a patch #6626, unfortunately it cannot be backported to 3.2. I have no idea how to fix this without monkey patching for current version.
Thanks @route. No backporting means we'll get sooner onto rails 4 :)
For now I'm using this workaround.
No problem, I'm waiting for this event too ;)
for render with :format, took me some hours for something that stupid, since it is totally legible and it is a good idea test each view formats separately.