Files
grecia/app/controllers/valuation/budgets_controller.rb
Javi Martín b0f1b6245e Simplify scope usage
Rails automatically calls the `id` method inside scopes and the variable
name makes more sense if it represents investments instead of the number
of investments.
2018-12-21 17:17:35 +01:00

16 lines
374 B
Ruby

class Valuation::BudgetsController < Valuation::BaseController
include FeatureFlags
feature_flag :budgets
load_and_authorize_resource
def index
@budget = current_budget
if @budget.present?
@investments = @budget.investments
.by_valuator(current_user.valuator)
.valuation_open
end
end
end