Skip to content

Instantly share code, notes, and snippets.

@benaskins
Created February 2, 2009 05:31
Show Gist options
  • Select an option

  • Save benaskins/56791 to your computer and use it in GitHub Desktop.

Select an option

Save benaskins/56791 to your computer and use it in GitHub Desktop.
%ol.autocomplete
%li
%label
Weatherzone Location:
= text_field_with_auto_complete :location, :wz_locality_name, {}, {:url => formatted_wz_localities_path(:js), :method => :get, :param_name => 'search', :skip_style =>
<%= auto_complete_result @wz_localities, :name %>
def index
@wz_localities = WzLocality.find(:all, :conditions => ['name LIKE ?', "%#{params[:search]}%"])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment