From e2ae787b36e32627974a0d448694c0067327fed7 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Tue, 13 May 2014 08:18:07 -0300 Subject: Simplify merge call on polymorphic helpers --- actionpack/lib/action_dispatch/routing/polymorphic_routes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch') 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 # polymorphic_url with routing_type: :path. 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 -- cgit v1.2.3