If I have a table: users(id, name, address, city) How can I validate: Name must be entered, but address and city can be null, but if there is address, there also must be a city. So city can't be null, if address is not, but bouth address and city can be null.
validates_presence_of name validates ???? -- 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 -~----------~----~----~----~------~----~------~--~---

