UNFINISHED budget management
This commit is contained in:
@@ -2,6 +2,7 @@ class Management::BudgetInvestmentsController < Management::BaseController
|
||||
|
||||
before_action :only_verified_users, except: :print
|
||||
before_action :set_budget_investment, only: [:vote, :show]
|
||||
before_action :load_budget
|
||||
|
||||
def index
|
||||
@budget_investments = apply_filters_and_search(Budget::Investment).order(cached_votes_up: :desc).page(params[:page]).for_render
|
||||
|
||||
16
app/controllers/management/budgets_controller.rb
Normal file
16
app/controllers/management/budgets_controller.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
class Management::BudgetsController < Management::BaseController
|
||||
include FeatureFlags
|
||||
feature_flag :budgets
|
||||
|
||||
has_filters %w{open finished}, only: :index
|
||||
|
||||
load_and_authorize_resource
|
||||
|
||||
def index
|
||||
@budgets = @budgets.send(@current_filter).order(created_at: :desc).page(params[:page])
|
||||
end
|
||||
|
||||
def show
|
||||
@budget = Budget.includes(groups: :headings).find(params[:id])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user