Hello! I have a guestlist page which lists tickets and a user can attache a guest to each ticket by using an auto complete form.
If each ticket has a guest attached, then the guestlist is 'full' I have this rule in my controller and I want to turn it into a validation in the model. Any ideas? (sudo code) if Ticket.find(first, condition => guestlist_id = ? and guest_id IS NILL) attach guest else display 'guestlist is full' end Thanks for your help Scott -- 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---