method
map_collection_actions
map_collection_actions(map, resource)
private
Hide source
# File actionpack/lib/action_controller/resources.rb, line 235 def map_collection_actions(map, resource) resource.collection_methods.each do |method, actions| route_options = requirements_for(method) actions.each do |action| map.named_route( "#{resource.name_prefix}#{action}_#{resource.plural}", "#{resource.path};#{action}", route_options.merge(:action => action.to_s) ) map.named_route( "formatted_#{resource.name_prefix}#{action}_#{resource.plural}", "#{resource.path}.:format;#{action}", route_options.merge(:action => action.to_s) ) end end map.named_route("#{resource.name_prefix}#{resource.plural}", resource.path, :action => "index", :conditions => { :method => :get }) map.named_route("formatted_#{resource.name_prefix}#{resource.plural}", "#{resource.path}.:format", :action => "index", :conditions => { :method => :get }) map.connect(resource.path, :action => "create", :conditions => { :method => :post }) map.connect("#{resource.path}.:format", :action => "create", :conditions => { :method => :post }) end


