diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2010-08-20 08:33:48 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-08-20 09:32:48 -0300 |
commit | 771d2f918fc87bdd4f83e6666fd816e9f0dcedfb (patch) | |
tree | 869060290b887eb0186ac87da9af2da0489deef0 /actionpack/lib/action_dispatch/routing | |
parent | 43291469cb1587f8f48ce96d79487bbffa6bc29f (diff) | |
download | rails-771d2f918fc87bdd4f83e6666fd816e9f0dcedfb.tar.gz rails-771d2f918fc87bdd4f83e6666fd816e9f0dcedfb.tar.bz2 rails-771d2f918fc87bdd4f83e6666fd816e9f0dcedfb.zip |
Allow symbols for :path resource(s) option [#5306 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-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 b9e097e5d1..5c5e7ed612 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -473,7 +473,7 @@ module ActionDispatch def initialize(entities, options = {}) @name = entities.to_s - @path = options.delete(:path) || @name + @path = (options.delete(:path) || @name).to_s @controller = (options.delete(:controller) || @name).to_s @as = options.delete(:as) @options = options @@ -537,7 +537,7 @@ module ActionDispatch def initialize(entities, options) @name = entities.to_s - @path = options.delete(:path) || @name + @path = (options.delete(:path) || @name).to_s @controller = (options.delete(:controller) || plural).to_s @as = options.delete(:as) @options = options |