Skip to content

Commit

Permalink
Set the rendered_format on respond_to.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Mar 7, 2012
1 parent bcea8cd commit e7560bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions actionpack/lib/action_controller/metal/mime_responds.rb
Expand Up @@ -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
Expand Down

3 comments on commit e7560bc

@tenderlove
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Y U NO ADD TEST? 😳

@josevalim
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test was pushed later iirc.

@tenderlove
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Please sign in to comment.