Files
grecia/config/routes/budget.rb
denialtorres bb627a7117 Edit Budget Investment only in accepting phase (#3716)
This way users who made a typo can fix it before the investment is reviewed.
2019-10-18 13:59:14 +02:00

24 lines
836 B
Ruby

resources :budgets, only: [:show, :index] do
resources :groups, controller: "budgets/groups", only: [:show]
resources :investments, controller: "budgets/investments" do
member do
post :vote
put :flag
put :unflag
end
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"
resource :stats, only: :show, controller: "budgets/stats"
resource :executions, only: :show, controller: "budgets/executions"
end
get "investments/:id/json_data", action: :json_data, controller: "budgets/investments"
get "/budgets/:budget_id/investments/:id/json_data", action: :json_data, controller: "budgets/investments"