aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorthedarkone <thedarkone2@gmail.com>2011-07-28 20:00:48 +0200
committerthedarkone <thedarkone2@gmail.com>2011-07-28 20:00:48 +0200
commit4d4d2179f68ecda5736feb6cccd897b73653bce9 (patch)
tree575357a7ff950791f65d99502414a65beb18aa56 /actionpack/lib
parent02691d3516e68b2de5545ec7a495024a377f89fc (diff)
downloadrails-4d4d2179f68ecda5736feb6cccd897b73653bce9.tar.gz
rails-4d4d2179f68ecda5736feb6cccd897b73653bce9.tar.bz2
rails-4d4d2179f68ecda5736feb6cccd897b73653bce9.zip
There is no need to be destructive with the passed-in options.
This fixes a bug that is caused by Resource/SingletonResource mangling resource options when using inline "multi"-resource declarations.
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 8d071b2061..36d878aee9 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -879,9 +879,9 @@ module ActionDispatch
def initialize(entities, options = {})
@name = entities.to_s
- @path = (options.delete(:path) || @name).to_s
- @controller = (options.delete(:controller) || @name).to_s
- @as = options.delete(:as)
+ @path = (options[:path] || @name).to_s
+ @controller = (options[:controller] || @name).to_s
+ @as = options[:as]
@options = options
end
@@ -945,9 +945,9 @@ module ActionDispatch
def initialize(entities, options)
@as = nil
@name = entities.to_s
- @path = (options.delete(:path) || @name).to_s
- @controller = (options.delete(:controller) || plural).to_s
- @as = options.delete(:as)
+ @path = (options[:path] || @name).to_s
+ @controller = (options[:controller] || plural).to_s
+ @as = options[:as]
@options = options
end