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:
parent
327545c3ae
commit
3f025e6408
1 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue