Changeset 7526
- Timestamp:
- 09/21/07 18:06:01 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/resources.rb
r7447 r7526 97 97 def action_separator 98 98 @action_separator ||= Base.resource_action_separator 99 end 100 101 def uncountable? 102 @singular.to_s == @plural.to_s 99 103 end 100 104 … … 442 446 def map_default_collection_actions(map, resource) 443 447 index_action_options = action_options_for("index", resource) 444 map.named_route("#{resource.name_prefix}#{resource.plural}", resource.path, index_action_options) 445 map.named_route("formatted_#{resource.name_prefix}#{resource.plural}", "#{resource.path}.:format", index_action_options) 448 index_route_name = "#{resource.name_prefix}#{resource.plural}" 449 450 if resource.uncountable? 451 index_route_name << "_index" 452 end 453 454 map.named_route(index_route_name, resource.path, index_action_options) 455 map.named_route("formatted_#{index_route_name}", "#{resource.path}.:format", index_action_options) 446 456 447 457 create_action_options = action_options_for("create", resource)