Skip to content

Instantly share code, notes, and snippets.

@fitoria
Created December 5, 2008 04:37
Show Gist options
  • Save fitoria/32235 to your computer and use it in GitHub Desktop.
Save fitoria/32235 to your computer and use it in GitHub Desktop.
##controlador
#auto_complete_for :modelo, :campo
auto_complete_for :paciente, :nombre
auto_complete_for :examen, :nombre
## config/routes.rb
map.resources :admin, :collection => {:auto_complete_for_paciente_nombre => :get,:auto_complete_for_examen_nombre => :get } ##no toy seguro pero seguro funca
##vista
<%= text_field_with_auto_complete :paciente, :nombre, {}, {:method => :get, :skip_style => true}%>
<%= text_field_with_auto_complete :examen, :nombre, {}, {:method => :get, :skip_style => true}%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment