Xavier Noria wrote: > On Sat, Aug 23, 2008 at 5:16 PM, Neil Cauldwell > <[email protected]> wrote: > >> I'm attempting an auto_complete by user.name, but it's not as simple as >> it sounds. I've followed the great Railscast on the topic, and I do have >> the ajaxiness working just fine when I search by ID (I was doing this >> for testing purposes - I don't want users using IDs to find each other, >> luckily). My auto_complete field needs to work the same as the GitHub >> 'Collaborator' addition form (or the Facebook search), whereby we find >> the user by user.name. My problem is that the user.name attribute is >> only a method in my user.rb, it is not a unique attribute, nor does it >> exist in the users table. So, we can't identify a user through it, we >> need the ID. > > model_auto_completer addresses this: > > http://agilewebdevelopment.com/plugins/model_auto_completer > > I happen to be the author but I'd recommend it if I wasn't anyway.
Does model_auto_complete work with has_many :through relationships? belongs_to relationhips work like a charm but I can't seem to get has_many :through relationships to work. Any examples available? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

