1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Resource collection should be defined before member routes

This commit is contained in:
Joshua Peek 2009-11-29 15:23:27 -06:00
parent 327545c3ae
commit 3f025e6408

View file

@ -75,18 +75,18 @@ module ActionDispatch
with_scope_level(:resources, :name => singular) do
yield if block_given?
collection do
get "", :to => :index, :as => plural
post "", :to => :create
get "new", :to => :new, :as => "new_#{singular}"
end
member do
get "", :to => :show, :as => singular
put "", :to => :update
delete "", :to => :destroy
get "edit", :to => :edit, :as => "edit_#{singular}"
end
collection do
get "", :to => :index, :as => plural
post "", :to => :create
get "new", :to => :new, :as => "new_#{singular}"
end
end
end
end