Sha256: 564b7fec95079bbbafbae12bddf198464f4d9c181b33cd7600cd2a993e082553

Contents?: true

Size: 763 Bytes

Versions: 227

Compression:

Stored size: 763 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbForm
    module FormBuilder
      module CollectionSelectField
        def collection_select(name, collection, value_method, text_method, options = {}, html_options = {}, props: {} )
          props[:label] = @template.label(@object_name, name) if props[:label] == true
          options[:skip_default_ids] = false unless options.has_key?(:skip_default_ids)
          options[:prompt] = props[:blank_selection] || ""
          html_options[:required] = "required" if props[:required]
          input = super(name, collection, value_method, text_method, options, html_options)

          @template.pb_rails("select", props: props) do
            input
          end
        end
      end
    end
  end
end

Version data entries

227 entries across 227 versions & 1 rubygems

Version Path
playbook_ui-8.3.0.alpha.select.pre.margin app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.3.0 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.2.1.pre.alpha5 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.2.1.pre.alpha4 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.2.1.alpha.iconacc app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.2.1.pre.alpha3 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.2.1.pre.alpha2 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.3.0.deps2 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.3.0.pre.alpha1 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.2.1.pre.alpha1 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.2.1 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.1.3 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.4.0.alpha.dependencies.2 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.4.0.alpha.dependencies.1 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.2.0.pre.alpha4 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.2.0.pre.alpha3 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.2.0 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.1.2 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.1.0.pre.alpha1 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
playbook_ui-8.0.3 app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb