diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-07-31 09:47:46 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-07-31 09:47:46 -0300 |
commit | dccdee7e2d021e700c51fc4612ff617e645ccb51 (patch) | |
tree | bd76e5a16b9e73f65b048aeec30b58927f7f8f1e | |
parent | a9c0eb439263a10937918a32b19d23478245d7f8 (diff) | |
download | rails-dccdee7e2d021e700c51fc4612ff617e645ccb51.tar.gz rails-dccdee7e2d021e700c51fc4612ff617e645ccb51.tar.bz2 rails-dccdee7e2d021e700c51fc4612ff617e645ccb51.zip |
Simplify code branch, remove #tap
-rw-r--r-- | actionpack/lib/action_controller/metal/url_for.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/actionpack/lib/action_controller/metal/url_for.rb b/actionpack/lib/action_controller/metal/url_for.rb index dc742ce466..0f2fa5fb08 100644 --- a/actionpack/lib/action_controller/metal/url_for.rb +++ b/actionpack/lib/action_controller/metal/url_for.rb @@ -34,14 +34,13 @@ module ActionController (script_name = env["ROUTES_#{_routes.object_id}_SCRIPT_NAME"]) || (original_script_name = env['ORIGINAL_SCRIPT_NAME'.freeze]) - @_url_options.dup.tap do |options| - if original_script_name - options[:original_script_name] = original_script_name - else - options[:script_name] = same_origin ? request.script_name.dup : script_name - end - options.freeze + options = @_url_options.dup + if original_script_name + options[:original_script_name] = original_script_name + else + options[:script_name] = same_origin ? request.script_name.dup : script_name end + options.freeze else @_url_options end |