Sha256: c0f3c2ab38d5fac2b23d9d9854e3ba4789af4c5ea87c4717f1c075d6ec9114e1

Contents?: true

Size: 791 Bytes

Versions: 12

Compression:

Stored size: 791 Bytes

Contents

#
# Load the formtastic plugin if using Formtastic
#
begin
  require 'formtastic'
  begin
    require "formtastic/version"
  rescue LoadError
  end

  if defined?(Formtastic::VERSION)
    #
    # Formtastic 2.x
    #

    module Formtastic
      module Inputs
        class AutocompleteInput
          include Base
          include Base::Stringish

          def to_html
            input_wrapping do
              label_html <<
              builder.autocomplete_field(method, options.delete(:url), input_html_options)
            end
          end
        end
      end
    end
  else

    #
    # Formtastic 1.x
    #
    class Formtastic::SemanticFormBuilder < ActionView::Helpers::FormBuilder
      include Rails3JQueryAutocomplete::FormtasticPlugin
    end
  end
rescue LoadError
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rails3-jquery-autocomplete-1.0.15 lib/rails3-jquery-autocomplete/formtastic.rb
rails3-jquery-autocomplete-1.0.14 lib/rails3-jquery-autocomplete/formtastic.rb
rails3-jquery-autocomplete-1.0.13 lib/rails3-jquery-autocomplete/formtastic.rb
rails3-jquery-autocomplete-1.0.12 lib/rails3-jquery-autocomplete/formtastic.rb
rails3-jquery-autocomplete-1.0.11 lib/rails3-jquery-autocomplete/formtastic.rb
rails3-jquery-autocomplete-1.0.10 lib/rails3-jquery-autocomplete/formtastic.rb
rails3-jquery-autocomplete-1.0.9 lib/rails3-jquery-autocomplete/formtastic.rb
rails3-jquery-autocomplete-1.0.8 lib/rails3-jquery-autocomplete/formtastic.rb
rails3-jquery-autocomplete-1.0.7 lib/rails3-jquery-autocomplete/formtastic.rb
rails3-jquery-autocomplete-1.0.6 lib/rails3-jquery-autocomplete/formtastic.rb
rails3-jquery-autocomplete-1.0.5 lib/rails3-jquery-autocomplete/formtastic.rb
rails3-jquery-autocomplete-1.0.4 lib/rails3-jquery-autocomplete/formtastic.rb