diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-11-10 21:31:37 -0800 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-11-10 21:31:37 -0800 |
commit | b72304f41ed33c266189973c7e8869124fbc2130 (patch) | |
tree | 484362f6904cf665c3fda4b6000b7a0d9def64bc /actionpack/lib | |
parent | 4a344c50a1a7a7f544f96c71d613fbb959c5b777 (diff) | |
parent | 83f75a97e27a9ee40887c5eb167036d5b1c05056 (diff) | |
download | rails-b72304f41ed33c266189973c7e8869124fbc2130.tar.gz rails-b72304f41ed33c266189973c7e8869124fbc2130.tar.bz2 rails-b72304f41ed33c266189973c7e8869124fbc2130.zip |
Merge pull request #12838 from strzalek/remove_mime_type_order_var
Remove @order attribute from collector
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/mime_responds.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb index a072fce1a1..84ade41036 100644 --- a/actionpack/lib/action_controller/metal/mime_responds.rb +++ b/actionpack/lib/action_controller/metal/mime_responds.rb @@ -396,10 +396,10 @@ module ActionController #:nodoc: # request, with this response then being accessible by calling #response. class Collector include AbstractController::Collector - attr_accessor :order, :format + attr_accessor :format def initialize(mimes) - @order, @responses = [], {} + @responses = {} mimes.each { |mime| send(mime) } end @@ -414,7 +414,6 @@ module ActionController #:nodoc: def custom(mime_type, &block) mime_type = Mime::Type.lookup(mime_type.to_s) unless mime_type.is_a?(Mime::Type) - @order << mime_type @responses[mime_type] ||= block end @@ -423,7 +422,7 @@ module ActionController #:nodoc: end def negotiate_format(request) - @format = request.negotiate_mime(order) + @format = request.negotiate_mime(@responses.keys) end end end |