private Method

Resources.map_default_collection_actions(map, resource)

There's no documentation for this item.

Source Code

# File action_controller/resources.rb, line 455
def map_default_collection_actions(map, resource)
  index_action_options = action_options_for("index", resource)
  index_route_name = "#{resource.name_prefix}#{resource.plural}"

  if resource.uncountable?
    index_route_name << "_index"
  end

  map.named_route(index_route_name, resource.path, index_action_options)
  map.named_route("formatted_#{index_route_name}", "#{resource.path}.:format", index_action_options)

  create_action_options = action_options_for("create", resource)
  map.connect(resource.path, create_action_options)
  map.connect("#{resource.path}.:format", create_action_options)
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.