Class: Pageflow::Admin::ExtensibleAttributesTable::RowInserter

Inherits:
Object
  • Object
show all
Defined in:
app/views/components/pageflow/admin/extensible_attributes_table.rb

Overview

Since:

  • 12.2

Instance Method Summary collapse

Constructor Details

#initialize(context, additional_rows) ⇒ RowInserter

Returns a new instance of RowInserter.

Since:

  • 12.2



15
16
17
18
19
# File 'app/views/components/pageflow/admin/extensible_attributes_table.rb', line 15

def initialize(context, additional_rows)
  @context = context
  @additional_rows = additional_rows
  @rendered_rows = []
end

Instance Method Details

#at_end_of_tableObject

Since:

  • 12.2



27
28
29
# File 'app/views/components/pageflow/admin/extensible_attributes_table.rb', line 27

def at_end_of_table
  render_additional_rows(not_yet_rendered_rows)
end

#row(name, options = {}, &block) ⇒ Object

Since:

  • 12.2



21
22
23
24
25
# File 'app/views/components/pageflow/admin/extensible_attributes_table.rb', line 21

def row(name, options = {}, &block)
  render_additional_rows(rows_at(:before, name))
  context.row(name, options, &block)
  render_additional_rows(rows_at(:after, name))
end