Skip to content

Commit

Permalink
Formtastic 2.0 compatibilty fix
Browse files Browse the repository at this point in the history
Conflicts:

	lib/rails3-jquery-autocomplete.rb
  • Loading branch information
cthiel authored and David Padilla committed Sep 20, 2011
1 parent defce9b commit a9c4a5b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/rails3-jquery-autocomplete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,20 @@ class ActionController::Base
# TODO: Better way to load plugins
begin
require 'formtastic'
class Formtastic::FormBuilder < ActionView::Helpers::FormBuilder
include Rails3JQueryAutocomplete::FormtasticPlugin
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
rescue LoadError
end
Expand Down

0 comments on commit a9c4a5b

Please sign in to comment.