From 2d50ba6fd56ad4664a4a9a1d31926192bbeec91f Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 25 Dec 2020 00:59:48 -0600 Subject: [PATCH] posts: fix /posts/random route. Fixup for 039ccfa3a. --- config/routes.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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