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:
evazion
2017-06-22 16:43:25 -05:00
parent d3e8937716
commit 41b9a8a044

View File

@@ -196,6 +196,7 @@ Rails.application.routes.draw do
get :diff
end
end
resources :post_replacements, :only => [:index, :new, :create]
resources :posts do
resources :events, :only => [:index], :controller => "post_events"
resources :replacements, :only => [:index, :new, :create], :controller => "post_replacements"
@@ -217,7 +218,6 @@ Rails.application.routes.draw do
end
resources :post_appeals
resources :post_flags
resources :post_replacements, :only => [:index, :new, :create]
resources :post_versions, :only => [:index, :search] do
member do
put :undo