diff options
author | thedarkone <thedarkone2@gmail.com> | 2011-07-28 20:00:48 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-08-13 16:22:23 -0700 |
commit | 37b30d4b4eb983579f083627b3faa065be527a61 (patch) | |
tree | cd4cc2d6b194647ec177299f261956f49042018a /actionpack/lib | |
parent | c4cf9073a15c7185ee7da345c41e341009a7a690 (diff) | |
download | rails-37b30d4b4eb983579f083627b3faa065be527a61.tar.gz rails-37b30d4b4eb983579f083627b3faa065be527a61.tar.bz2 rails-37b30d4b4eb983579f083627b3faa065be527a61.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.rb | 12 |
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 53374949ae..a53a2d98d3 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -872,9 +872,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 @@ -938,9 +938,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 |