Autocomplete lists should be based on "q" parameter

If you don't filter server-side, the user sees the full list until
another character is entered.
This commit is contained in:
Eric Allen 2010-04-02 13:36:25 -04:00
parent 9ccd6d11d8
commit c79d1c964a
4 changed files with 6 additions and 5 deletions

View file

@ -530,7 +530,7 @@ class TodosController < ApplicationController
def tags
@tags = Tag.all
respond_to do |format|
format.autocomplete { render :text => for_autocomplete(@tags) }
format.autocomplete { render :text => for_autocomplete(@tags, params[:q]) }
end
end