aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing/route_set.rb
diff options
context:
space:
mode:
authorJesús García Sáez <blaxter@gmail.com>2009-06-23 22:54:32 +0200
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-07-02 12:18:48 -0700
commitfc6077d76ecbf20d29e9963afcabfd613d839091 (patch)
treeb602f496778197890eeac8c19c2a39b5bcdd0c45 /actionpack/lib/action_controller/routing/route_set.rb
parent0fbf458b6c7992a1626282727a70636af19450d5 (diff)
downloadrails-fc6077d76ecbf20d29e9963afcabfd613d839091.tar.gz
rails-fc6077d76ecbf20d29e9963afcabfd613d839091.tar.bz2
rails-fc6077d76ecbf20d29e9963afcabfd613d839091.zip
Allow symbols on routes declaration (:controller and :action values) [#2828 state:resolved]
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
Diffstat (limited to 'actionpack/lib/action_controller/routing/route_set.rb')
-rw-r--r--actionpack/lib/action_controller/routing/route_set.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/routing/route_set.rb b/actionpack/lib/action_controller/routing/route_set.rb
index 87b4b0571c..f5a4b1e1db 100644
--- a/actionpack/lib/action_controller/routing/route_set.rb
+++ b/actionpack/lib/action_controller/routing/route_set.rb
@@ -305,6 +305,7 @@ module ActionController
end
def add_route(path, options = {})
+ options.each { |k, v| options[k] = v.to_s if [:controller, :action].include?(k) && v.is_a?(Symbol) }
route = builder.build(path, options)
routes << route
route