Extract groups and headings tables to components

This commit is contained in:
Julian Herrero
2020-03-17 12:55:35 +07:00
committed by Javi Martín
parent 2115eb5274
commit b16fe80ba5
6 changed files with 104 additions and 74 deletions

View File

@@ -0,0 +1,13 @@
class Admin::BudgetGroups::GroupsComponent < ApplicationComponent
attr_reader :groups
def initialize(groups)
@groups = groups
end
private
def budget
@budget ||= groups.first.budget
end
end