Fix rendered format for render partial #5603

Merged
merged 1 commit into from Mar 27, 2012

Projects

None yet

2 participants

@drogus
Ruby on Rails member
@drogus drogus If partial is rendered in controller, grab format from template
Previously `rendered_format` was set only based on mime types
passed in Accept header, which was wrong if first type from
Accept was different than rendered partial. The fix is to simply
move setting rendered_format to the place where template
is available and grab format from the template. If it fails
we can fallback to formats passed by Accept header.
449a4fc
@josevalim josevalim merged commit e31ec47 into rails:3-2-stable Mar 27, 2012
@josevalim
Ruby on Rails member

Can you send a PR for master pls?

@drogus
Ruby on Rails member

@josevalim I will just commit, I've sent a pull request because I was not sure if this is correct and needed some feedback :)

@josevalim
Ruby on Rails member

Dobry pies!

@drogus
Ruby on Rails member

lol :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment