Class: Shoelace::Components::SlSelect

Inherits:
ActionView::Helpers::Tags::Select
  • 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, choices, options, html_options, slot) ⇒ SlSelect

Returns a new instance of SlSelect.



31
32
33
34
# File 'app/helpers/shoelace/components/sl_select.rb', line 31

def initialize(object_name, method_name, template_object, choices, options, html_options, slot)
  @slot = slot
  super(object_name, method_name, template_object, choices, options, html_options)
end

Instance Attribute Details

#slotObject (readonly)

Returns the value of attribute slot.



29
30
31
# File 'app/helpers/shoelace/components/sl_select.rb', line 29

def slot
  @slot
end

Instance Method Details

#grouped_options_for_select(grouped_options, options) ⇒ Object



36
37
38
# File 'app/helpers/shoelace/components/sl_select.rb', line 36

def grouped_options_for_select(grouped_options, options)
  @template_object.grouped_sl_options_for_select(grouped_options, options)
end

#options_for_select(container, options = nil) ⇒ Object



40
41
42
# File 'app/helpers/shoelace/components/sl_select.rb', line 40

def options_for_select(container, options = nil)
  @template_object.sl_options_for_select(container, options)
end