Sha256: 0c18445f8e061e03b5ba312cf7287c1e652e7868f0791ab812a3faae2528ecfd

Contents?: true

Size: 556 Bytes

Versions: 1

Compression:

Stored size: 556 Bytes

Contents

require "simple_form/inputs/base"

class TokenInput < SimpleForm::Inputs::Base
  #
  # one:
  # <%= f.input :category_id, :as => :token %>
  #
  # many:
  # <%= f.input :category_ids, :as => :token %>
  def input(wrapper_options=nil)
    if respond_to?(:merge_wrapper_options)
      merged_input_options = merge_wrapper_options(input_html_options, wrapper_options).
          merge(input_options)
    else
      merged_input_options = input_html_options.merge(input_options)
    end

    @builder.token_field(attribute_name, merged_input_options)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
token_field-2.0.0 lib/token_field/simple_form/token_input.rb