Class: Shoelace::Components::SlCollectionSelect
- Inherits:
-
ActionView::Helpers::Tags::CollectionSelect
- Object
- ActionView::Helpers::Tags::CollectionSelect
- Shoelace::Components::SlCollectionSelect
- 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
-
#slot ⇒ Object
readonly
Returns the value of attribute slot.
Instance Method Summary collapse
-
#initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options, slot) ⇒ SlCollectionSelect
constructor
A new instance of SlCollectionSelect.
- #options_from_collection_for_select(collection, value_method, text_method, selected = nil) ⇒ Object
Methods included from SlSelectRenderable
Methods included from ErrorWrappable
Constructor Details
#initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options, slot) ⇒ SlCollectionSelect
Returns a new instance of SlCollectionSelect.
51 52 53 54 |
# File 'app/helpers/shoelace/components/sl_select.rb', line 51 def initialize(object_name, method_name, template_object, collection, value_method, text_method, , , slot) @slot = slot super(object_name, method_name, template_object, collection, value_method, text_method, , ) end |
Instance Attribute Details
#slot ⇒ Object (readonly)
Returns the value of attribute slot.
49 50 51 |
# File 'app/helpers/shoelace/components/sl_select.rb', line 49 def slot @slot end |
Instance Method Details
#options_from_collection_for_select(collection, value_method, text_method, selected = nil) ⇒ Object
56 57 58 |
# File 'app/helpers/shoelace/components/sl_select.rb', line 56 def (collection, value_method, text_method, selected = nil) @template_object.(collection, value_method, text_method, selected) end |