The interface was a bit confusing, since after clicking on "See unfeasible investments" (or similar), we were on a page where no investments were shown. Besides, since commit7e3dd47d5, the group page is only linked from the "my ballot" page, through a link inviting the user to vote in that group, and it's only possible to vote selected investments (which is the default filter during the final voting phase). The only reason we had these links here was these links weren't present in the investments page. But they're present there since commit04605d5d5, so we don't need them in the group page anymore.
28 lines
538 B
Ruby
28 lines
538 B
Ruby
module Budgets
|
|
class GroupsController < ApplicationController
|
|
include FeatureFlags
|
|
feature_flag :budgets
|
|
|
|
before_action :load_budget
|
|
before_action :load_group, only: [:show]
|
|
authorize_resource :budget
|
|
authorize_resource :group, class: "Budget::Group"
|
|
|
|
def show
|
|
end
|
|
|
|
def index
|
|
end
|
|
|
|
private
|
|
|
|
def load_budget
|
|
@budget = Budget.find_by_slug_or_id! params[:budget_id]
|
|
end
|
|
|
|
def load_group
|
|
@group = @budget.groups.find_by_slug_or_id! params[:id]
|
|
end
|
|
end
|
|
end
|