post replacements: fix post_replacements_path helper.
Bug: `post_replacements_path` returned the wrong path because the `/posts/:post_id/replacements` route took precedence over the `/post_replacements` route. Fix: declare the `/post_replacements` route first so that it takes precedence instead.
This commit is contained in:
@@ -196,6 +196,7 @@ Rails.application.routes.draw do
|
|||||||
get :diff
|
get :diff
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
resources :post_replacements, :only => [:index, :new, :create]
|
||||||
resources :posts do
|
resources :posts do
|
||||||
resources :events, :only => [:index], :controller => "post_events"
|
resources :events, :only => [:index], :controller => "post_events"
|
||||||
resources :replacements, :only => [:index, :new, :create], :controller => "post_replacements"
|
resources :replacements, :only => [:index, :new, :create], :controller => "post_replacements"
|
||||||
@@ -217,7 +218,6 @@ Rails.application.routes.draw do
|
|||||||
end
|
end
|
||||||
resources :post_appeals
|
resources :post_appeals
|
||||||
resources :post_flags
|
resources :post_flags
|
||||||
resources :post_replacements, :only => [:index, :new, :create]
|
|
||||||
resources :post_versions, :only => [:index, :search] do
|
resources :post_versions, :only => [:index, :search] do
|
||||||
member do
|
member do
|
||||||
put :undo
|
put :undo
|
||||||
|
|||||||
Reference in New Issue
Block a user