method
map_new_actions
map_new_actions(map, resource)
private
Hide source
# File actionpack/lib/action_controller/resources.rb, line 261 def map_new_actions(map, resource) resource.new_methods.each do |method, actions| route_options = requirements_for(method) actions.each do |action| if action == :new map.named_route("#{resource.name_prefix}new_#{resource.singular}", resource.new_path, route_options.merge(:action => "new")) map.named_route("formatted_#{resource.name_prefix}new_#{resource.singular}", "#{resource.new_path}.:format", route_options.merge(:action => "new")) else map.named_route("#{resource.name_prefix}#{action}_new_#{resource.singular}", "#{resource.new_path};#{action}", route_options.merge(:action => action.to_s)) map.named_route("formatted_#{resource.name_prefix}#{action}_new_#{resource.singular}", "#{resource.new_path}.:format;#{action}", route_options.merge(:action => action.to_s)) end end end end


