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.
16 lines
374 B
Ruby
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
|