Split routes into small files for easier customization (#1852)
This commit is contained in:
19
config/routes/budget.rb
Normal file
19
config/routes/budget.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
resources :budgets, only: [:show, :index] do
|
||||
resources :groups, controller: "budgets/groups", only: [:show]
|
||||
resources :investments, controller: "budgets/investments", only: [:index, :new, :create, :show, :destroy] do
|
||||
member { post :vote }
|
||||
collection { get :suggest }
|
||||
end
|
||||
|
||||
resource :ballot, only: :show, controller: "budgets/ballots" do
|
||||
resources :lines, controller: "budgets/ballot/lines", only: [:create, :destroy]
|
||||
end
|
||||
|
||||
resource :results, only: :show, controller: "budgets/results"
|
||||
end
|
||||
|
||||
scope '/participatory_budget' do
|
||||
resources :spending_proposals, only: [:index, :new, :create, :show, :destroy], path: 'investment_projects' do
|
||||
post :vote, on: :member
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user