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.
22 lines
722 B
Ruby
22 lines
722 B
Ruby
resources :budgets, only: [:show, :index] do
|
|
resources :groups, controller: "budgets/groups", only: [:show, :index]
|
|
resources :investments, controller: "budgets/investments" do
|
|
member do
|
|
put :flag
|
|
put :unflag
|
|
end
|
|
|
|
collection { get :suggest }
|
|
|
|
resources :votes, controller: "budgets/investments/votes", only: [:create, :destroy]
|
|
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
|