diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-08-05 20:46:49 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-08-05 20:46:49 +0000 |
commit | 5130fc84c602001d31454a5631ee7b354d197663 (patch) | |
tree | 8cec1213c1c5013e1f42f24f6c5f3bb24c5ba5c9 /actionpack/lib | |
parent | 01e389c965af85901ee8ea77fe099fd3081e07ea (diff) | |
download | rails-5130fc84c602001d31454a5631ee7b354d197663.tar.gz rails-5130fc84c602001d31454a5631ee7b354d197663.tar.bz2 rails-5130fc84c602001d31454a5631ee7b354d197663.zip |
Remove duplicate routes from mapped resources (closes #5712) [eigentone@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4669 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/resources.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/resources.rb b/actionpack/lib/action_controller/resources.rb index 35ca2dcf2f..ef8da1ded4 100644 --- a/actionpack/lib/action_controller/resources.rb +++ b/actionpack/lib/action_controller/resources.rb @@ -143,9 +143,10 @@ module ActionController end map.connect(resource.member_path, route_options.merge(:action => primary)) unless primary.blank? - map.named_route("#{resource.name_prefix}#{resource.singular}", resource.member_path, :action => "show", :conditions => { :method => :get }) - map.named_route("formatted_#{resource.name_prefix}#{resource.singular}", "#{resource.member_path}.:format", :action => "show", :conditions => { :method => :get }) end + + map.named_route("#{resource.name_prefix}#{resource.singular}", resource.member_path, :action => "show", :conditions => { :method => :get }) + map.named_route("formatted_#{resource.name_prefix}#{resource.singular}", "#{resource.member_path}.:format", :action => "show", :conditions => { :method => :get }) end def requirements_for(method) @@ -154,4 +155,4 @@ module ActionController end end -ActionController::Routing::RouteSet::Mapper.send :include, ActionController::Resources +ActionController::Routing::RouteSet::Mapper.send :include, ActionController::Resources
\ No newline at end of file |