Extract groups and headings tables to components
This commit is contained in:
committed by
Javi Martín
parent
2115eb5274
commit
b16fe80ba5
13
app/components/admin/budget_groups/groups_component.rb
Normal file
13
app/components/admin/budget_groups/groups_component.rb
Normal 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
|
||||
Reference in New Issue
Block a user