Browse files

Set the rendered_format on respond_to.

  • Loading branch information...
1 parent bcea8cd commit e7560bc787545e09ad10b474fb1b46365f6fc3f1 @josevalim josevalim committed Mar 7, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 actionpack/lib/action_controller/metal/mime_responds.rb
View
1 actionpack/lib/action_controller/metal/mime_responds.rb
@@ -273,6 +273,7 @@ def retrieve_collector_from_mimes(mimes=nil, &block) #:nodoc:
if format
self.content_type ||= format.to_s
lookup_context.formats = [format.to_sym]
+ lookup_context.rendered_format = lookup_context.formats.first
collector
else
head :not_acceptable

3 comments on commit e7560bc

@tenderlove
Ruby on Rails member

Y U NO ADD TEST? 😳

@josevalim
Ruby on Rails member

A test was pushed later iirc.

@tenderlove
Ruby on Rails member

❤️

Please sign in to comment.