Class: Impulse::AjaxSelectComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Impulse::AjaxSelectComponent
- Defined in:
- app/components/impulse/ajax_select_component.rb
Instance Method Summary collapse
-
#initialize(object_name, method_name, value_method, text_method, selected: nil, **system_args) ⇒ AjaxSelectComponent
constructor
A new instance of AjaxSelectComponent.
Methods inherited from ApplicationComponent
Methods included from Helpers::AttributesHelper
Constructor Details
#initialize(object_name, method_name, value_method, text_method, selected: nil, **system_args) ⇒ AjaxSelectComponent
Returns a new instance of AjaxSelectComponent.
6 7 8 9 10 11 12 13 14 15 |
# File 'app/components/impulse/ajax_select_component.rb', line 6 def initialize(object_name, method_name, value_method, text_method, selected: nil, **system_args) @object_name = object_name @method_name = method_name @value_method = value_method @text_method = text_method @selected = selected @system_args = system_args raise ArgumentError, "`src` attribute is missing" unless @system_args[:src] end |