Files
grecia/config/routes/moderation.rb
Javi Martín 021fef07b6 Make action names to block and hide more clear
The `hide` action was calling the `block` method while the `soft_block`
action was calling the `hide` method.

Combined with the fact that we also have a `block` permission which is
used in `ModerateActions` the logic was hard to follow.
2021-12-30 15:50:03 +01:00

44 lines
968 B
Ruby

namespace :moderation do
root to: "dashboard#index"
resources :users, only: :index do
member do
put :hide
put :block
end
end
resources :debates, only: :index do
put :hide, on: :member
put :moderate, on: :collection
end
resources :proposals, only: :index do
put :hide, on: :member
put :moderate, on: :collection
end
namespace :legislation do
resources :proposals, only: :index do
put :hide, on: :member
put :moderate, on: :collection
end
end
resources :comments, only: :index do
put :hide, on: :member
put :moderate, on: :collection
end
resources :proposal_notifications, only: :index do
put :hide, on: :member
put :moderate, on: :collection
end
resources :administrator_tasks, only: %i[index edit update]
resources :budget_investments, only: :index, controller: "budgets/investments" do
put :hide, on: :member
put :moderate, on: :collection
end
end