From fca617af143dd8598502bdbaa617e7fe124d595e Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Wed, 18 Aug 2010 07:31:52 +0800 Subject: [PATCH] Allow member actions (get, etc) to accept strings, with test --- actionpack/lib/action_dispatch/routing/mapper.rb | 1 + actionpack/test/dispatch/routing_test.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index c118c72440199..c27f06c686383 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -731,6 +731,7 @@ def match(*args) 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 3f090b72540ba..4dabe1531c400 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -128,7 +128,7 @@ def self.matches?(request) end member do - get :some_path_with_name + get 'some_path_with_name' put :accessible_projects post :resend, :generate_new_password end