Permalink
Browse files

Simplify code branch, remove #tap

  • Loading branch information...
carlosantoniodasilva committed Jul 31, 2014
1 parent a9c0eb4 commit dccdee7e2d021e700c51fc4612ff617e645ccb51
Showing with 6 additions and 7 deletions.
  1. +6 −7 actionpack/lib/action_controller/metal/url_for.rb
@@ -34,14 +34,13 @@ def url_options
(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

0 comments on commit dccdee7

Please sign in to comment.