By using the bindPopup function instead of the click event popups work when using the keyboard. Note that now we are loading all the map markers in the first request in a single query to the database (needed when there is a lot or markers to show). Because of that we removed the AJAX endpoint.
26 lines
847 B
Ruby
26 lines
847 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
|
|
|
|
resolve "Budget::Investment" do |investment, options|
|
|
[investment.budget, :investment, options.merge(id: investment)]
|
|
end
|