Class: Shoelace::Components::SlGroupedCollectionSelect

Inherits:
ActionView::Helpers::Tags::GroupedCollectionSelect
  • Object
show all
Includes:
ErrorWrappable, SlSelectRenderable
Defined in:
app/helpers/shoelace/components/sl_select.rb

Overview

:nodoc:

Constant Summary

Constants included from SlSelectRenderable

Shoelace::Components::SlSelectRenderable::EMPTY

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SlSelectRenderable

#select_content_tag

Methods included from ErrorWrappable

#error_wrapping

Constructor Details

#initialize(object_name, method_name, template_object, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options, slot) ⇒ SlGroupedCollectionSelect

Returns a new instance of SlGroupedCollectionSelect.



67
68
69
70
# File 'app/helpers/shoelace/components/sl_select.rb', line 67

def initialize(object_name, method_name, template_object, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options, slot)
  @slot = slot
  super(object_name, method_name, template_object, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options)
end

Instance Attribute Details

#slotObject (readonly)

Returns the value of attribute slot.



65
66
67
# File 'app/helpers/shoelace/components/sl_select.rb', line 65

def slot
  @slot
end

Instance Method Details

#option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = nil) ⇒ Object



72
73
74
# File 'app/helpers/shoelace/components/sl_select.rb', line 72

def option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = nil)
  @template_object.sl_option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key)
end