aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/cookies.rb
diff options
context:
space:
mode:
authorŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-12-08 22:11:46 +0100
committerŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-12-08 22:11:46 +0100
commit9b8c0ff391cdaf23e5a74198ad29f8983df0b9d7 (patch)
tree51165f76a305ee5fd01d01e42c839c509b4f5106 /actionpack/lib/action_controller/metal/cookies.rb
parent99975e742eb2636cd814f2c9de21f4bd3c3dbbc7 (diff)
downloadrails-9b8c0ff391cdaf23e5a74198ad29f8983df0b9d7.tar.gz
rails-9b8c0ff391cdaf23e5a74198ad29f8983df0b9d7.tar.bz2
rails-9b8c0ff391cdaf23e5a74198ad29f8983df0b9d7.zip
Simplify @responses hash initialization
@responses hash needs to be initialized with mime types that we get from Collector#collect_mimes_from_class_level. Mime::Type class as key and nil as value. This need to happen before content negotiation. Before that, it was looping though mime types and executing mime-type-generated method inside collector (see AbstractController::Collector#generate_method_for_mime). That approach resulted in 2 unnecessary method calls for each mime type collected by Collector#collect_mimes_from_class_level. Now hash is initialized in place, without usage of Collector#custom method.
Diffstat (limited to 'actionpack/lib/action_controller/metal/cookies.rb')
0 files changed, 0 insertions, 0 deletions