aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/resources.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/resources.rb')
-rw-r--r--actionpack/lib/action_controller/resources.rb9
1 files changed, 0 insertions, 9 deletions
diff --git a/actionpack/lib/action_controller/resources.rb b/actionpack/lib/action_controller/resources.rb
index dcc4c19c90..3fc9c326b4 100644
--- a/actionpack/lib/action_controller/resources.rb
+++ b/actionpack/lib/action_controller/resources.rb
@@ -225,7 +225,6 @@ module ActionController
def map_collection_actions(map, resource)
resource.collection_methods.each do |method, actions|
- primary = actions.shift.to_s if method != :get
route_options = requirements_for(method)
actions.each do |action|
@@ -241,11 +240,6 @@ module ActionController
route_options.merge(:action => action.to_s)
)
end
-
- unless primary.blank?
- map.connect(resource.path, route_options.merge(:action => primary))
- map.connect("#{resource.path}.:format", route_options.merge(:action => primary))
- end
end
map.named_route("#{resource.name_prefix}#{resource.plural}", resource.path, :action => "index", :conditions => { :method => :get })
@@ -271,14 +265,11 @@ module ActionController
def map_member_actions(map, resource)
resource.member_methods.each do |method, actions|
route_options = requirements_for(method)
- primary = actions.shift.to_s unless [ :get, :post, :any ].include?(method)
actions.each do |action|
map.named_route("#{resource.name_prefix}#{action}_#{resource.singular}", "#{resource.member_path};#{action}", route_options.merge(:action => action.to_s))
map.named_route("formatted_#{resource.name_prefix}#{action}_#{resource.singular}", "#{resource.member_path}.:format;#{action}", route_options.merge(:action => action.to_s))
end
-
- map.connect(resource.member_path, route_options.merge(:action => primary)) unless primary.blank?
end
map.named_route("#{resource.name_prefix}#{resource.singular}", resource.member_path, :action => "show", :conditions => { :method => :get })