Class: ViewComponent::Form::TimeZoneSelectComponent
- Inherits:
-
FieldComponent
- Object
- BaseComponent
- FieldComponent
- ViewComponent::Form::TimeZoneSelectComponent
- Defined in:
- app/components/view_component/form/time_zone_select_component.rb
Instance Attribute Summary collapse
-
#html_options ⇒ Object
readonly
Returns the value of attribute html_options.
-
#priority_zones ⇒ Object
readonly
Returns the value of attribute priority_zones.
Attributes inherited from FieldComponent
Attributes inherited from BaseComponent
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(form, object_name, method_name, priority_zones, options = {}, html_options = {}) ⇒ TimeZoneSelectComponent
constructor
rubocop:disable Metrics/ParameterLists.
Methods inherited from FieldComponent
#label_text, #method_errors, #method_errors?, #object_method_names, #optional?, #required?, #validators, #value
Methods inherited from BaseComponent
#html_class, #object_errors, #object_errors?
Methods included from ClassNamesHelper
#build_tag_values, #class_names
Constructor Details
#initialize(form, object_name, method_name, priority_zones, options = {}, html_options = {}) ⇒ TimeZoneSelectComponent
rubocop:disable Metrics/ParameterLists
8 9 10 11 12 13 14 15 |
# File 'app/components/view_component/form/time_zone_select_component.rb', line 8 def initialize(form, object_name, method_name, priority_zones, = {}, = {}) # rubocop:disable Metrics/ParameterLists @priority_zones = priority_zones @html_options = super(form, object_name, method_name, ) end |
Instance Attribute Details
#html_options ⇒ Object (readonly)
Returns the value of attribute html_options.
6 7 8 |
# File 'app/components/view_component/form/time_zone_select_component.rb', line 6 def @html_options end |
#priority_zones ⇒ Object (readonly)
Returns the value of attribute priority_zones.
6 7 8 |
# File 'app/components/view_component/form/time_zone_select_component.rb', line 6 def priority_zones @priority_zones end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'app/components/view_component/form/time_zone_select_component.rb', line 17 def call ActionView::Helpers::Tags::TimeZoneSelect.new( object_name, method_name, @view_context, priority_zones, , ).render end |