.auto_complete ul {
list-style-type: none;
margin:0px;
padding:0px;
}
.auto_complete ul li.selected
{
background-color: #bbf;
}
.auto_complete ul li {
list-style-type: none;
display:block;
margin:0;
padding:2px;
height:16px;
}
That’s all I have. The problem is that, it doesn’t do anything, I can’t
see anything in my text_field_with_auto_complete, it doesn’t show any
error, can someone help me please I really want to get it right…thank
you!!
Is your Alumno controller setup as a RESTful resource? If so, then
the auto complete call won’t work because the auto_complete url isn’t
one of the default routes created with a RESTful resource. You could
explicitly add the route but I would suggest checking out this episode
of Railscasts:
It gives a straightforward approach to creating an auto complete field
with a RESTful setup.
Is your Alumno controller setup as a RESTful resource? If so, then
the auto complete call won’t work because the auto_complete url isn’t
one of the default routes created with a RESTful resource. You could
explicitly add the route but I would suggest checking out this episode
of Railscasts:
Alumnos is my table and belongs to a data base call Prueba, so my model
is alumno.rb and my controller is completar_controller.rb, I will check
the page that you recommend me, and try to do some changes, if it work I
will tell you. Thanks
.auto_complete ul {
list-style-type: none;
margin:0px;
padding:0px;
}
.auto_complete ul li.selected
{
background-color: #bbf;
}
.auto_complete ul li {
list-style-type: none;
display:block;
margin:0;
padding:2px;
height:16px;
}
That’s all I have. The problem is that, it doesn’t do anything, I can’t
see anything in my text_field_with_auto_complete, it doesn’t show any
error, can someone help me please I really want to get it right…thank
you!!
Hi Juan.
As I’m fairly new to RoR I may not be the right one to solve your
problem. But since you ask so direct here is what I did:
Couple of things
a) Your stylesheet is called complete.css but your stylesheet_link_tag
says “example” ?
b) Check your logs as you type to see if rails fires off queries
depending on your input… The autocomplete method is doing a “find”
which should be firing off SQLs in ur log file. You would atleast know
if that part of it is working.