diff --git a/config/routes.rb b/config/routes.rb index 4bceb91fe..1f39cbf94 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,8 @@ Rails.application.routes.draw do - resources :posts, only: [:index, :show, :update, :destroy] + resources :posts, only: [:index, :show, :update, :destroy] do + get :random, on: :collection + end + resources :autocomplete, only: [:index] # XXX This comes *after* defining posts above because otherwise the paginator @@ -187,9 +190,6 @@ Rails.application.routes.draw do member { put :revert } end resource :votes, controller: "post_votes", only: [:create, :destroy], as: "post_votes" - collection do - get :random - end member do put :revert put :copy_notes