I have a model, User that has n, :accounts
I want to validate the presence of 2 columns (email & passwd) in the User model when that instance does not have any associated accounts. The idea being that user that signs up with Facebook does not need to use email and password.
Right now I have this, but I'm stuck
validates_presence_of :email, :passwd, :if => lambda { |u| u.accounts.length }