Class: Input::DatetimeComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Input::DatetimeComponent
- Defined in:
- app/components/input/datetime_component.rb
Instance Method Summary collapse
-
#initialize(item:, field:, form:, disabled: false) ⇒ DatetimeComponent
constructor
A new instance of DatetimeComponent.
- #label ⇒ Object
Constructor Details
#initialize(item:, field:, form:, disabled: false) ⇒ DatetimeComponent
Returns a new instance of DatetimeComponent.
5 6 7 8 9 10 11 |
# File 'app/components/input/datetime_component.rb', line 5 def initialize(item:, field:, form:, disabled: false) @item = item @field = field @form = form @label = label @disabled = disabled end |
Instance Method Details
#label ⇒ Object
13 14 15 |
# File 'app/components/input/datetime_component.rb', line 13 def label I18n.t("bo.#{@item.class.name.underscore}.attributes.#{@field}") end |