aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2014-05-13 08:18:07 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2014-05-13 08:18:07 -0300
commite2ae787b36e32627974a0d448694c0067327fed7 (patch)
tree40834dcbd62e843f9cdac90211d41298977b688c /actionpack/lib/action_dispatch
parent0b2eee453c20ad9b725a97d145fa59d49dcd6a92 (diff)
downloadrails-e2ae787b36e32627974a0d448694c0067327fed7.tar.gz
rails-e2ae787b36e32627974a0d448694c0067327fed7.tar.bz2
rails-e2ae787b36e32627974a0d448694c0067327fed7.zip
Simplify merge call on polymorphic helpers
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/routing/polymorphic_routes.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
index 7afb2838e0..bd3696cda1 100644
--- a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
+++ b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
@@ -102,7 +102,7 @@ module ActionDispatch
#
def polymorphic_url(record_or_hash_or_array, options = {})
if Hash === record_or_hash_or_array
- options = record_or_hash_or_array.dup.merge!(options)
+ options = record_or_hash_or_array.merge(options)
record = options.delete :id
return polymorphic_url record, options
end
@@ -123,7 +123,7 @@ module ActionDispatch
# <tt>polymorphic_url</tt> with <tt>routing_type: :path</tt>.
def polymorphic_path(record_or_hash_or_array, options = {})
if Hash === record_or_hash_or_array
- options = record_or_hash_or_array.dup.merge!(options)
+ options = record_or_hash_or_array.merge(options)
record = options.delete :id
return polymorphic_path record, options
end