Class: InnerPlan::Groups::RowsComponent

Inherits:
Phlex::HTML
  • Object
show all
Defined in:
app/components/inner_plan/groups/rows_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(groups, list:, context: nil) ⇒ RowsComponent

Returns a new instance of RowsComponent.



3
4
5
6
7
# File 'app/components/inner_plan/groups/rows_component.rb', line 3

def initialize(groups, list:, context: nil)
  @groups = groups
  @list = list
  @context = context
end

Instance Method Details

#templateObject



9
10
11
12
13
14
15
# File 'app/components/inner_plan/groups/rows_component.rb', line 9

def template
  div(data: { controller: :groups, tasks_list_id_value: @list.id }) {
    @groups.each do |group|
      render(InnerPlan::Groups::RowComponent.new(group, context: @context))
    end
  }
end