Class: TableColumnComponentPreview
- Inherits:
-
ViewComponent::Preview
- Object
- ViewComponent::Preview
- TableColumnComponentPreview
- Defined in:
- lib/alveole/previews/table_column_component_preview.rb
Defined Under Namespace
Classes: TempObj
Instance Method Summary collapse
- #default ⇒ Object
- #with_custom_value ⇒ Object
- #with_date ⇒ Object
- #with_time ⇒ Object
- #with_url ⇒ Object
Instance Method Details
#default ⇒ Object
12 13 14 15 |
# File 'lib/alveole/previews/table_column_component_preview.rb', line 12 def default temp_obj = TempObj.new render(TableColumnComponent.new(value: nil, obj: temp_obj, fieldname: :fieldname, url: nil, options: {})) end |
#with_custom_value ⇒ Object
32 33 34 35 |
# File 'lib/alveole/previews/table_column_component_preview.rb', line 32 def with_custom_value temp_obj = TempObj.new render(TableColumnComponent.new(value: 'custom value', obj: temp_obj, fieldname: :fieldname, url: nil, options: {})) end |
#with_date ⇒ Object
22 23 24 25 |
# File 'lib/alveole/previews/table_column_component_preview.rb', line 22 def with_date temp_obj = TempObj.new(Time.zone.today) render(TableColumnComponent.new(value: nil, obj: temp_obj, fieldname: :fieldname, url: 'example/url', options: { date: true })) end |
#with_time ⇒ Object
27 28 29 30 |
# File 'lib/alveole/previews/table_column_component_preview.rb', line 27 def with_time temp_obj = TempObj.new(Time.zone.now) render(TableColumnComponent.new(value: nil, obj: temp_obj, fieldname: :fieldname, url: 'example/url', options: { time: true })) end |
#with_url ⇒ Object
17 18 19 20 |
# File 'lib/alveole/previews/table_column_component_preview.rb', line 17 def with_url temp_obj = TempObj.new render(TableColumnComponent.new(value: nil, obj: temp_obj, fieldname: :fieldname, url: 'example/url', options: {})) end |