aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-09-14 19:53:04 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-09-14 19:53:04 +0000
commit3d3ba58dbb2cfd4bbb0c1c868d754134a6f9ea3c (patch)
tree22b8988d9ad4f950db8671bdf107db173803888e /actionpack/lib/action_controller
parent6dbac689a8d7f285ccdb2e3fa2b2967d731475ab (diff)
downloadrails-3d3ba58dbb2cfd4bbb0c1c868d754134a6f9ea3c.tar.gz
rails-3d3ba58dbb2cfd4bbb0c1c868d754134a6f9ea3c.tar.bz2
rails-3d3ba58dbb2cfd4bbb0c1c868d754134a6f9ea3c.zip
remove implicit primary actions - more pain than gain. test collection actions for other http methods. strip whitespace.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5111 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/resources.rb9
1 files changed, 0 insertions, 9 deletions
diff --git a/actionpack/lib/action_controller/resources.rb b/actionpack/lib/action_controller/resources.rb
index dcc4c19c90..3fc9c326b4 100644
--- a/actionpack/lib/action_controller/resources.rb
+++ b/actionpack/lib/action_controller/resources.rb
@@ -225,7 +225,6 @@ module ActionController
def map_collection_actions(map, resource)
resource.collection_methods.each do |method, actions|
- primary = actions.shift.to_s if method != :get
route_options = requirements_for(method)
actions.each do |action|
@@ -241,11 +240,6 @@ module ActionController
route_options.merge(:action => action.to_s)
)
end
-
- unless primary.blank?
- map.connect(resource.path, route_options.merge(:action => primary))
- map.connect("#{resource.path}.:format", route_options.merge(:action => primary))
- end
end
map.named_route("#{resource.name_prefix}#{resource.plural}", resource.path, :action => "index", :conditions => { :method => :get })
@@ -271,14 +265,11 @@ module ActionController
def map_member_actions(map, resource)
resource.member_methods.each do |method, actions|
route_options = requirements_for(method)
- primary = actions.shift.to_s unless [ :get, :post, :any ].include?(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
-
- map.connect(resource.member_path, route_options.merge(:action => primary)) unless primary.blank?
end
map.named_route("#{resource.name_prefix}#{resource.singular}", resource.member_path, :action => "show", :conditions => { :method => :get })