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
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
2 matches
Mail list logo