title: Not searching when using Autocomplete
body: <p>I followed this tutorial: <a href="http://railscasts.com/episodes/102-auto-complete-association" rel="nofollow">http://railscasts.com/episodes/102-auto-complete-association</a></p>
  
  <p><em>But It did not work.</em></p>
  
  <p>What I did was the following:</p>
  
  <p>I installed the plugin using</p>
  
  <pre><code>rails plugin install git://github.com/rails/auto_complete.git
  </code></pre>
  
  <p>In my message.rb I declare user_name</p>
  
  <pre><code> def user_name
      user.username if user
    end
  
    def user_name= (username)
      self.user = User.find_or_create_by_username(username) unless username.blank?
    end
  </code></pre>
  
  <p>In my application.html.haml i added</p>
  
  <pre><code>= javascript_include_tag :defaults
  </code></pre>
  
  <p>In my profile/users/index.js.erb</p>
  
  <pre><code>&lt;%= auto_complete_result @users, :username %&gt;
  </code></pre>
  
  <p>I tried running <code>http://localhost:8080/profile/users.js</code></p>
  
  <p>And it outputs the intended list of users.</p>
  
  <p>In my users_controller.rb</p>
  
  <pre><code>    auto_complete_for :message, :user_name
    def index
      @users = User.find(:all, :conditions =&gt; ['username LIKE ?', "%#{params[:search]}%"])
      respond_to do |format|
        format.html # index.html.erb
        format.js # index.js.erb
      end
    end
  </code></pre>
  
  <p>When i rake routes i get the proper output needed for views</p>
  
  <pre><code> profile_users GET    /profile/users(.:format)                                {:action=&gt;"index", :controller=&gt;"profile/users"}
  </code></pre>
  
  <p>Finally in my profile/messages/compose.html.haml</p>
  
  <pre><code>= form_for :message, :url =&gt; send_message_profile_messages_path do |message|
    %label{:for =&gt; "friend"} To:
    %br
    = text_field_with_auto_complete :message,:user_name, {:size =&gt; 15} , {:url =&gt;profile_users_path(:format =&gt; :js), :method =&gt; :get, :param_name =&gt; 'search' }
    %br
    %label{:for =&gt; "message"} Body:
    %br
    = message.text_area :message
    %br
    = message.file_field :attachment
    %br
    = submit_tag "Send", :confirm =&gt; "Are you sure?"
  </code></pre>
  
  <p>What Have I done wrong?</p>