aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2012-09-29 20:21:16 +0200
committerYves Senn <yves.senn@garaio.com>2012-10-01 15:52:56 +0200
commitb30ce037150c72a4ca44ce02c580bc360b17c36b (patch)
tree1e78e6dc7bb66a615038a9161835c7298812fc11 /actionpack/lib/action_dispatch/routing
parent997a16442f90f0a8a52246d21e65868b91703261 (diff)
downloadrails-b30ce037150c72a4ca44ce02c580bc360b17c36b.tar.gz
rails-b30ce037150c72a4ca44ce02c580bc360b17c36b.tar.bz2
rails-b30ce037150c72a4ca44ce02c580bc360b17c36b.zip
resource and resources do no longer modify passed options
this is a patch for #7777.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 49afa01d25..c5cf413c8f 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1038,7 +1038,7 @@ module ActionDispatch
# === Options
# Takes same options as +resources+.
def resource(*resources, &block)
- options = resources.extract_options!
+ options = resources.extract_options!.dup
if apply_common_behavior_for(:resource, resources, options, &block)
return self
@@ -1204,7 +1204,7 @@ module ActionDispatch
# # resource actions are at /admin/posts.
# resources :posts, :path => "admin/posts"
def resources(*resources, &block)
- options = resources.extract_options!
+ options = resources.extract_options!.dup
if apply_common_behavior_for(:resources, resources, options, &block)
return self