Re: Re: Re: [Rails] Validations not working on complex DB transaction

2013-08-06 Thread Rob Biedenharn
On 2013-Aug-6, at 10:13 , masta Blasta wrote: selva4...@gmail.com wrote in post #1117870: Hi, The @user object is getting saved first. That time, there is no instuition membership attached to it. So one is getting created. Then when you save the instuition membership again inside the

[Rails] Validations not working on complex DB transaction

2013-08-01 Thread masta Blasta
The models: class User has_many :institution_memberships belongs_to :account after_create :set_default_membership def set_default_membership if institution_memberships.empty? institution_memberships.create(default_data_from_account) end end end