aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-08-18 07:31:52 +0800
committerJosé Valim <jose.valim@gmail.com>2010-08-17 20:41:13 -0300
commitfca617af143dd8598502bdbaa617e7fe124d595e (patch)
tree88f6a9ff8de80ddcef513ed0447ff350afef062c /actionpack
parenta0ca3d1067a4e6fdee3baaff35a4547b3a1aa991 (diff)
downloadrails-fca617af143dd8598502bdbaa617e7fe124d595e.tar.gz
rails-fca617af143dd8598502bdbaa617e7fe124d595e.tar.bz2
rails-fca617af143dd8598502bdbaa617e7fe124d595e.zip
Allow member actions (get, etc) to accept strings, with test
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb1
-rw-r--r--actionpack/test/dispatch/routing_test.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index c118c72440..c27f06c686 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -731,6 +731,7 @@ module ActionDispatch
end
elsif resource_method_scope?
path = path_for_custom_action
+ options[:action] ||= action
options[:as] = name_for_action(options[:as]) if options[:as]
args.push(options)
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 3f090b7254..4dabe1531c 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -128,7 +128,7 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
end
member do
- get :some_path_with_name
+ get 'some_path_with_name'
put :accessible_projects
post :resend, :generate_new_password
end