You can call validation first, and proceed to saving
only if everything validates:
if @user.valid? && @team.valid?
the ‘valid?’ method does what you’d expect; the
‘false’ paramter to the save method means “don’t do
validation while saving” (since by the time you get to
the save statement, the validation has already
But if I do @user.save and then @team.save, whether
validations on team
the user is created but team doesn’t and I want non of
them to be
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around