Class: Components::Databasium::Records::Table::Row

Inherits:
Base
  • Object
show all
Includes:
Phlex::Rails::Helpers::ClassNames, Phlex::Rails::Helpers::DOMID
Defined in:
app/components/databasium/records/table/row.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record:, turbo_frame:, render_as_cards: false) ⇒ Row

Returns a new instance of Row.



7
8
9
10
11
# File 'app/components/databasium/records/table/row.rb', line 7

def initialize(record:, turbo_frame:, render_as_cards: false)
  @record = record
  @turbo_frame = turbo_frame
  @render_as_cards = render_as_cards
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



5
6
7
# File 'app/components/databasium/records/table/row.rb', line 5

def record
  @record
end

Instance Method Details

#view_templateObject



13
14
15
# File 'app/components/databasium/records/table/row.rb', line 13

def view_template
  @render_as_cards ? render_card : render_row
end