Module: JrailsAutoCompleteTagHelper

Defined in:
lib/jrails_auto_complete_tag_helper.rb

Instance Method Summary collapse

Instance Method Details

#to_auto_complete(options = {}) ⇒ Object



3
4
5
6
# File 'lib/jrails_auto_complete_tag_helper.rb', line 3

def to_auto_complete(options = {})
  send(:add_default_name_and_id, options)
  @template_object.auto_complete_field(options['id'], options)
end

#to_text_field_with_auto_complete(options = {}, text_field_options = {}) ⇒ Object



8
9
10
# File 'lib/jrails_auto_complete_tag_helper.rb', line 8

def to_text_field_with_auto_complete(options = {}, text_field_options = {})
  to_input_field_tag('text', text_field_options) + to_auto_complete(options)
end