I am currently working on implementing an autocomplete textfield for my Rails application, following the example from the Agile Web Development with Rails, 3rd Edition. However, when I try to insert their demo code:
<%= stylesheet_link_tag 'autocomplete' %>
<h1>Editing user</h1>
<% form_tag :action => 'update', :id => @user do %>
<%= error_messages_for 'user' %>
<p>Username<br/>
<%= @user.username %></p>
<%# codecite autocomplete %>
<p><label for="user_favorite_language">Favorite language</label><br/>
<%= text_field 'user', 'favorite_language' %></p>
<div class="auto_complete"
id="user_favorite_language_auto_complete"></div>
<%= auto_complete_field :user_favorite_language,
:url=>{:action=>'autocomplete_favorite_language'}, :tokens => ',' %>
<%# codecite autocomplete %>
<%= submit_tag 'Edit' %>
<% end %>
<%= link_to 'Show', :action => 'show', :id => @user %> |
<%= link_to 'Back', :action => 'list' %>
An error message pops up indicating:
undefined method `auto_complete_field' for #<ActionView::Base:0x20ab7dc>
Should there have been additional instructions provided for me to make this work? Visit here for more information.
EDIT: I initially assumed that simply installing the Scriptaculous library would suffice since this pertained to that section.