Class: Components::Databasium::Records::Table::Row
- Inherits:
-
Base
- Object
- Base
- Components::Databasium::Records::Table::Row
- Includes:
- Phlex::Rails::Helpers::ClassNames, Phlex::Rails::Helpers::DOMID
- Defined in:
- app/components/databasium/records/table/row.rb
Instance Attribute Summary collapse
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record:, turbo_frame:, render_as_cards: false) ⇒ Row
constructor
A new instance of Row.
- #view_template ⇒ Object
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
#record ⇒ Object (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_template ⇒ Object
13 14 15 |
# File 'app/components/databasium/records/table/row.rb', line 13 def view_template @render_as_cards ? render_card : render_row end |