Flowdock
method

map_default_collection_actions

Importance_0
v1.2.6 - Show latest stable - 0 notes - Class: ActionController::Resources
map_default_collection_actions(map, resource) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/resources.rb, line 368
      def map_default_collection_actions(map, resource)
        index_action_options = action_options_for("index", resource)
        map.named_route("#{resource.name_prefix}#{resource.plural}", resource.path, index_action_options)
        map.named_route("formatted_#{resource.name_prefix}#{resource.plural}", "#{resource.path}.:format", index_action_options)

        if resource.deprecate_name_prefix?
          map.deprecated_named_route("#{resource.name_prefix}#{resource.plural}", "#{resource.plural}")
          map.deprecated_named_route("formatted_#{resource.name_prefix}#{resource.plural}", "formatted_#{resource.plural}")
        end

        create_action_options = action_options_for("create", resource)
        map.connect(resource.path, create_action_options)
        map.connect("#{resource.path}.:format", create_action_options)
      end
Register or log in to add new notes.