Module: Tramway::Core::Concerns::TableBuilder
- Included in:
- ApplicationDecorator
- Defined in:
- app/decorators/tramway/core/concerns/table_builder.rb
Instance Method Summary collapse
- #table(**options, &block) ⇒ Object
- #td(**options, &block) ⇒ Object
- #th(**options, &block) ⇒ Object
- #thead(**options, &block) ⇒ Object
- #tr(**options, &block) ⇒ Object
Instance Method Details
#table(**options, &block) ⇒ Object
4 5 6 7 8 |
# File 'app/decorators/tramway/core/concerns/table_builder.rb', line 4 def table(**, &block) content_tag(:table, class: 'table table-bordered table-striped', **) do yield if block end end |
#td(**options, &block) ⇒ Object
22 23 24 25 26 |
# File 'app/decorators/tramway/core/concerns/table_builder.rb', line 22 def td(**, &block) content_tag(:td, **) do yield if block end end |
#th(**options, &block) ⇒ Object
16 17 18 19 20 |
# File 'app/decorators/tramway/core/concerns/table_builder.rb', line 16 def th(**, &block) content_tag(:th, **) do yield if block end end |
#thead(**options, &block) ⇒ Object
10 11 12 13 14 |
# File 'app/decorators/tramway/core/concerns/table_builder.rb', line 10 def thead(**, &block) content_tag(:thead, **) do yield if block end end |
#tr(**options, &block) ⇒ Object
28 29 30 31 32 |
# File 'app/decorators/tramway/core/concerns/table_builder.rb', line 28 def tr(**, &block) content_tag(:tr, **) do yield if block end end |