aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/test_unit/model/templates/unit_test.rb
diff options
context:
space:
mode:
authorŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-12-10 11:46:50 +0100
committerŁukasz Strzałkowski <lukasz.strzalkowski@gmail.com>2013-12-10 11:47:50 +0100
commitfbb6be50a55fef24cdef97c522d1acc9787cbf2a (patch)
treef522afc16cf2773b2d5c075abf94c61a2667521a /railties/lib/rails/generators/test_unit/model/templates/unit_test.rb
parent4aae538d9ffff3a00a81f3da52fa70f7fd79ac74 (diff)
downloadrails-fbb6be50a55fef24cdef97c522d1acc9787cbf2a.tar.gz
rails-fbb6be50a55fef24cdef97c522d1acc9787cbf2a.tar.bz2
rails-fbb6be50a55fef24cdef97c522d1acc9787cbf2a.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 'railties/lib/rails/generators/test_unit/model/templates/unit_test.rb')
0 files changed, 0 insertions, 0 deletions