Displaying 1 result from an estimated 1 matches for "auto_complete_for_team_nam".
Did you mean:
auto_complete_for_team_name
2006 Jul 11
0
text_field_with_auto_complete problem
...y not only the list of teams
(first line), but also their city and country(second line).
In my view, I have:
<p>
<label for="team_name">Team: </label>
<%= text_field_with_auto_complete :team, :name, {}, :skip_style => true
%>
</p>
In controller:
def auto_complete_for_team_name
unless request.get?
search = ''%'' + params[:team][:name].downcase + ''%''
@teams = Team.find(:all, :conditions => [''LOWER(name) LIKE ? or
LOWER(short_name) like ?'', search, search],
:order => ''name...