Class: Shoelace::Rails::Ui::FormHelper::ShoelaceCollectionSelect

Inherits:
ActionView::Helpers::Tags::CollectionSelect
  • Object
show all
Defined in:
app/helpers/shoelace/rails/ui/form_helper.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#options_from_collection_for_select(collection, value_method, text_method, selected = nil) ⇒ Object



116
117
118
# File 'app/helpers/shoelace/rails/ui/form_helper.rb', line 116

def options_from_collection_for_select(collection, value_method, text_method, selected = nil)
  @template_object.sl_options_from_collection_for_select(collection, value_method, text_method, selected)
end

#select_content_tag(option_tags, _options, html_options) ⇒ Object



120
121
122
123
124
125
126
# File 'app/helpers/shoelace/rails/ui/form_helper.rb', line 120

def (option_tags, _options, html_options)
  html_options = html_options.stringify_keys
  html_options['value']= value
  add_default_name_and_id(html_options)

  @template_object.("sl-select", option_tags, html_options)
end