@@ -1,5 +1,8 @@
|
|||||||
Rails.application.routes.draw do
|
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]
|
resources :autocomplete, only: [:index]
|
||||||
|
|
||||||
# XXX This comes *after* defining posts above because otherwise the paginator
|
# XXX This comes *after* defining posts above because otherwise the paginator
|
||||||
@@ -187,9 +190,6 @@ Rails.application.routes.draw do
|
|||||||
member { put :revert }
|
member { put :revert }
|
||||||
end
|
end
|
||||||
resource :votes, controller: "post_votes", only: [:create, :destroy], as: "post_votes"
|
resource :votes, controller: "post_votes", only: [:create, :destroy], as: "post_votes"
|
||||||
collection do
|
|
||||||
get :random
|
|
||||||
end
|
|
||||||
member do
|
member do
|
||||||
put :revert
|
put :revert
|
||||||
put :copy_notes
|
put :copy_notes
|
||||||
|
|||||||
Reference in New Issue
Block a user