aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-07-31 20:00:18 +0000
committerRick Olson <technoweenie@gmail.com>2006-07-31 20:00:18 +0000
commited4c295c4782b534121b04a6bc10b9f440ffa8c6 (patch)
tree7657e48774e8410b18cfc7dfe0ac5be08167029f /actionpack/lib
parent865b175765edf6138deb6f10ae3280ddea4cc7fd (diff)
downloadrails-ed4c295c4782b534121b04a6bc10b9f440ffa8c6.tar.gz
rails-ed4c295c4782b534121b04a6bc10b9f440ffa8c6.tar.bz2
rails-ed4c295c4782b534121b04a6bc10b9f440ffa8c6.zip
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
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/resources.rb2
1 files changed, 1 insertions, 1 deletions
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))