mail-FKvm6UFo9WVIGQV4ximdftrkRsMOXBsj@public.gmane.org
2006-Sep-18 03:05 UTC
Using Autocomplete with belongs_to fields
After a long search for a tutorial that could show me how too use the rails auto-complete with belongs_to fields, i found several pieces here and there that helped me figure out the solution to my problem. So I decided to share it with you as a small contribution to the rails community. Look for it at: http://ricardo.pacheco.name/blog/articles/category/rubyrails I use a very common case when you have a country model and a customer model which belongs_to country, that is, it contains a country_id key. So, in this tutorial I explain how can you use an auto-complete field to select the customer country, but after selecting an option updating the customer record with the corresponding country_id. I hope you find it useful. Ricardo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---