Module: ActionView::Helpers::FormTagHelper
- Defined in:
- lib/rails-autocomplete/form_helper.rb
Instance Method Summary collapse
-
#autocomplete_field_tag(name, value, source, options = {}) ⇒ Object
Creates a standard text field that can be populated with jQuery’s autocomplete plugin.
Instance Method Details
#autocomplete_field_tag(name, value, source, options = {}) ⇒ Object
Creates a standard text field that can be populated with jQuery’s autocomplete plugin
Examples
autocomplete_field_tag 'address', '', address_autocomplete_path, :size => 75
# => <input id="address" name="address" size="75" type="text" value="" data-autocomplete="address/autocomplete"/>
24 25 26 27 |
# File 'lib/rails-autocomplete/form_helper.rb', line 24 def autocomplete_field_tag(name, value, source, ={}) ["data-autocomplete"] = source text_field_tag(name, value, rewrite_autocomplete_option()) end |