diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-25 05:21:16 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-25 16:33:04 +0200 |
commit | b1cfcedc8f6dde3b0855fc8fd564e72e730ba5cf (patch) | |
tree | 459d52879fe866fe5321a730919a2ac6b7c55805 /actionpack/lib/action_dispatch | |
parent | 8d5b792e7dadf8b2f64b75b6fee51d15fde70699 (diff) | |
download | rails-b1cfcedc8f6dde3b0855fc8fd564e72e730ba5cf.tar.gz rails-b1cfcedc8f6dde3b0855fc8fd564e72e730ba5cf.tar.bz2 rails-b1cfcedc8f6dde3b0855fc8fd564e72e730ba5cf.zip |
Change returning with tap
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/deprecated_mapper.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/deprecated_mapper.rb b/actionpack/lib/action_dispatch/routing/deprecated_mapper.rb index b3146a1c60..4904f0633d 100644 --- a/actionpack/lib/action_dispatch/routing/deprecated_mapper.rb +++ b/actionpack/lib/action_dispatch/routing/deprecated_mapper.rb @@ -500,7 +500,7 @@ module ActionDispatch end def add_conditions_for(conditions, method) - returning({:conditions => conditions.dup}) do |options| + {:conditions => conditions.dup}.tap do |options| options[:conditions][:method] = method unless method == :any end end diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 64eb6d8de7..8e58adaf59 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -319,7 +319,7 @@ module ActionDispatch reset! unless @integration_session # reset the html_document variable, but only for new get/post calls @html_document = nil unless %w(cookies assigns).include?(method) - returning @integration_session.__send__(method, *args) do + @integration_session.__send__(method, *args).tap do copy_session_variables! end end @@ -362,7 +362,7 @@ module ActionDispatch def method_missing(sym, *args, &block) reset! unless @integration_session if @integration_session.respond_to?(sym) - returning @integration_session.__send__(sym, *args, &block) do + @integration_session.__send__(sym, *args, &block).tap do copy_session_variables! end else |