Sha256: 284384e26c239fd2120b1c4be2aed77225d65e4f075e2b0cba7a1e60ded98b78

Contents?: true

Size: 557 Bytes

Versions: 3

Compression:

Stored size: 557 Bytes

Contents

module Formtastic
  module Inputs
    class SelectizeInput < Formtastic::Inputs::SelectInput
      include Formtastic::Inputs::Base

      def input_html_options
        opts = super
        opts[:class] = opts[:class].blank? ? 'selectized' : ( opts[:class] + ' selectized' )
        opts
      end

      # def collection
      #   if !options[:collection] && column
      #     object.send( column.name ).map { |row| [ row.respond_to?( :name ) ? row.name : row.to_s, row.id ] }
      #   else
      #     super
      #   end
      # end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
activeadmin_selectize-0.1.6 lib/formtastic/inputs/selectize_input.rb
activeadmin_selectize-0.1.5 lib/formtastic/inputs/selectize_input.rb
activeadmin_selectize-0.1.4 lib/formtastic/inputs/selectize_input.rb