Sha256: ca76a222c2e339f332a5b0380bb9e61732f18e1f5b85ecb588b2b1d064a85bfc

Contents?: true

Size: 449 Bytes

Versions: 10

Compression:

Stored size: 449 Bytes

Contents

module AbAdmin
  module Views
    module Inputs
      class TokenInput < ::SimpleForm::Inputs::StringInput
        def input(wrapper_options=nil)
          attr = options.delete(:assoc) || attribute_name.to_s.sub(/^token_|_id$/, '')
          token_data = object.token_data(attr.to_sym, options.extract!(:geo_order, :c, :sortable))
          input_html_options.reverse_deep_merge!(token_data)
          super
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ab_admin-0.11.0 lib/ab_admin/views/inputs/token_input.rb
ab_admin-0.10.0 lib/ab_admin/views/inputs/token_input.rb
ab_admin-0.9.0 lib/ab_admin/views/inputs/token_input.rb
ab_admin-0.8.3 lib/ab_admin/views/inputs/token_input.rb
ab_admin-0.8.2 lib/ab_admin/views/inputs/token_input.rb
ab_admin-0.8.1 lib/ab_admin/views/inputs/token_input.rb
ab_admin-0.8.0 lib/ab_admin/views/inputs/token_input.rb
ab_admin-0.7.0 lib/ab_admin/views/inputs/token_input.rb
ab_admin-0.6.1 lib/ab_admin/views/inputs/token_input.rb
ab_admin-0.6.0 lib/ab_admin/views/inputs/token_input.rb