search for: guestlist_id

Displaying 1 result from an estimated 1 matches for "guestlist_id".

2009 May 23
0
Conditional Validation: only if a record can be found
...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/.