Class: Effective::TableRows::HasManyCard
- Inherits:
-
Effective::TableRow
- Object
- Effective::TableRow
- Effective::TableRows::HasManyCard
- Defined in:
- app/models/effective/table_rows/has_many_card.rb
Instance Attribute Summary
Attributes inherited from Effective::TableRow
#builder, #name, #options, #template
Instance Method Summary collapse
Methods inherited from Effective::TableRow
#content, #controller_namespace, #hint, #initialize, #label, #label_content, #tr_class, #value
Constructor Details
This class inherits a constructor from Effective::TableRow
Instance Method Details
#index ⇒ Object
21 22 23 |
# File 'app/models/effective/table_rows/has_many_card.rb', line 21 def index [:index] || 0 end |
#to_html(&block) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/models/effective/table_rows/has_many_card.rb', line 7 def to_html(&block) table = builder.render(&block) content_tag(:tr, class: "#{tr_class}-#{index+1}") do content_tag(:td, colspan: 2) do content_tag(:div, class: 'card my-3') do content_tag(:div, table, class: 'card-body') do content_tag(:h5, template.et(object) + " ##{index+1}", class: 'card-title') + table end end end end end |