Extract phases edition to a component

This commit is contained in:
Javi Martín
2021-02-18 20:11:59 +01:00
parent c4e7bf0938
commit fb5b067d00
3 changed files with 55 additions and 42 deletions

View File

@@ -0,0 +1,13 @@
class Admin::BudgetPhases::PhasesComponent < ApplicationComponent
attr_reader :budget
def initialize(budget)
@budget = budget
end
private
def phases
budget.phases.order(:id)
end
end