method
map_member_actions
map_member_actions(map, resource)
private
Hide source
# File actionpack/lib/action_controller/resources.rb, line 276 def map_member_actions(map, resource) resource.member_methods.each do |method, actions| route_options = requirements_for(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 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 }) map.connect(resource.member_path, :action => "update", :conditions => { :method => :put }) map.connect("#{resource.member_path}.:format", :action => "update", :conditions => { :method => :put }) map.connect(resource.member_path, :action => "destroy", :conditions => { :method => :delete }) map.connect("#{resource.member_path}.:format", :action => "destroy", :conditions => { :method => :delete }) end


