diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-27 20:51:25 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-27 20:52:11 +0100 |
commit | a09e99259c688a839bd5b4635da6f119dd1e0e41 (patch) | |
tree | 9e1399562185082853aacc837211f837f7a5a231 /actionpack/lib/action_controller/metal | |
parent | fdebc7f55bdd9730216ac1f00880838ae0db90bd (diff) | |
download | rails-a09e99259c688a839bd5b4635da6f119dd1e0e41.tar.gz rails-a09e99259c688a839bd5b4635da6f119dd1e0e41.tar.bz2 rails-a09e99259c688a839bd5b4635da6f119dd1e0e41.zip |
Ensure details are frozen after @details_keys lookup. The implementation waits to freeze until the last required moment, to avoid duping hashes.
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r-- | actionpack/lib/action_controller/metal/mime_responds.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb index fa69ab2038..4f384d1ec5 100644 --- a/actionpack/lib/action_controller/metal/mime_responds.rb +++ b/actionpack/lib/action_controller/metal/mime_responds.rb @@ -262,8 +262,7 @@ module ActionController #:nodoc: if format = request.negotiate_mime(collector.order) self.content_type ||= format.to_s - self.formats = [format.to_sym] - self.formats.freeze + lookup_context.freeze_formats([format.to_sym]) collector.response_for(format) else head :not_acceptable |