Class: TableColumnComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- TableColumnComponent
- Defined in:
- lib/alveole/components/table_column_component.rb
Instance Method Summary collapse
-
#initialize(value: nil, obj: nil, fieldname: nil, url: nil, options: {}) ⇒ TableColumnComponent
constructor
A new instance of TableColumnComponent.
Constructor Details
#initialize(value: nil, obj: nil, fieldname: nil, url: nil, options: {}) ⇒ TableColumnComponent
Returns a new instance of TableColumnComponent.
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/alveole/components/table_column_component.rb', line 2 def initialize(value: nil, obj: nil, fieldname: nil, url: nil, options: {}) super @obj = obj @fieldname = fieldname @value = value || obj&.send(fieldname) @value = ApplicationController.helpers.format_value(@value, ) @url = url @options = end |