vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb
# Wrapper for text_field with added AJAX autocompletion functionality.
#
# In your controller, you'll need to define an action called
# auto_complete_for to respond the AJAX calls,
# 
Wrapper for text_field with added AJAX autocompletion functionality.
In your controller, you'll need to define an action called
auto_complete_for to respond the AJAX calls.
Wrapper for text_field with added AJAX autocompletion functionality . In your controller you ' ll need to define an action called auto_complete_for to respond the AJAX calls .
def text_field_with_auto_complete(object, method, tag_options = {}, completion_options = {})
    (completion_options[:skip_style] ? "" : auto_complete_stylesheet) +
    text_field(object, method, tag_options) +
    content_tag("div", "", :id => "#{object}_#{method}_auto_complete", :class => "auto_complete") +
    auto_complete_field("#{object}_#{method}", { :url => { :action => "auto_complete_for_#{object}_#{method}" } }.update(completion_options))
  end
def text_field_with_auto_complete ( object , method , tag_options = { } , completion_options = { } ) ( completion_options [ :skip_style ] ? "" : auto_complete_stylesheet ) + text_field ( object , method , tag_options ) + content_tag ( "div" , "" , :id => "#{object}_#{method}_auto_complete" , :class => "auto_complete" ) + auto_complete_field ( "#{object}_#{method}" , { :url => { :action => "auto_complete_for_#{object}_#{method}" } } . update ( completion_options ) ) end
Wrapper for text_field with added AJAX autocompletion functionality.
Wrapper for text_field with added AJAX autocompletion functionality .
object
<not_specific>
method
<not_specific>
tag_options
<not_specific>
completion_options
<not_specific>