Files
grecia/config/routes/legislation.rb
Javi Martín 60dbda600d Move resolve clauses to the main routes file
We're going to add some constraints in the routes file, and if we add a
`resolve` clause inside a constraints block, we get an error saying that
"The resolve method can't be used inside a routes scope block" when
starting the application.
2024-11-06 11:07:00 +01:00

42 lines
937 B
Ruby

namespace :legislation do
resources :processes, only: [:index, :show] do
member do
get :debate
get :draft_publication
get :allegations
get :result_publication
get :proposals
get :milestones
get :summary
end
resources :questions, only: [:show] do
resources :answers, only: [:create]
end
resources :proposals, except: [:index] do
member do
put :flag
put :unflag
end
collection do
get :suggest
end
end
resources :legislation_proposals, path: "proposals", only: [] do
resources :votes, controller: "proposals/votes", only: [:create, :destroy]
end
resources :draft_versions, only: [:show] do
get :go_to_version, on: :collection
get :changes
resources :annotations do
get :search, on: :collection
get :comments
post :new_comment
end
end
end
end