From ed4c295c4782b534121b04a6bc10b9f440ffa8c6 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Mon, 31 Jul 2006 20:00:18 +0000 Subject: Fixed the new_#{resource}_url route and added named route tests for Simply Restful. [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4638 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/resources.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/resources.rb b/actionpack/lib/action_controller/resources.rb index fb27759004..b41cdf16e9 100644 --- a/actionpack/lib/action_controller/resources.rb +++ b/actionpack/lib/action_controller/resources.rb @@ -136,7 +136,7 @@ module ActionController route_options = requirements_for(method) actions.each do |action| path = action == :new ? resource.new_path : "#{resource.new_path};#{action}" - name = "new_#{resource.plural}" + name = "new_#{resource.singular}" name = "#{action}_#{name}" unless action == :new map.named_route("#{resource.name_prefix}#{name}", path, route_options.merge(:action => action.to_s)) -- cgit v1.2.3