diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-01 06:56:53 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-01 12:53:53 -0300 |
commit | 3b5bc8d71ba97ddc254ab3dc81893c82e81a783b (patch) | |
tree | e8795edca810d6413fbe808619912e018baf08ba /actionpack/lib/action_dispatch/routing/mapper.rb | |
parent | a02f67b39b0ca02a8dd871b75c9f2a9db3a40c7b (diff) | |
download | rails-3b5bc8d71ba97ddc254ab3dc81893c82e81a783b.tar.gz rails-3b5bc8d71ba97ddc254ab3dc81893c82e81a783b.tar.bz2 rails-3b5bc8d71ba97ddc254ab3dc81893c82e81a783b.zip |
Merge pull request #7789 from senny/7777_resource_functions_modify_options
resource and resources do no longer modify passed options
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 4 |
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 266d2d5fd1..cd2f464506 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -982,7 +982,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 @@ -1120,7 +1120,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 |