private
def update_contact_user
#check if some user matches the email entered
cuser = User.find :first, :conditions=>["email = ?", email]
contact_user = cuser if cuser
end
end
The callback is called correctly and finds a user, but for some reason
the association is not updated. If I do the same code in the calling
method (just before I call 'save') then it is working. Any guess? Am I
missing something?
private
def update_contact_user
#check if some user matches the email entered
cuser = User.find :first, :conditions=>["email = ?", email]
contact_user = cuser if cuser
end
end
The callback is called correctly and finds a user, but for some reason
the association is not updated. If I do the same code in the calling
method (just before I call 'save') then it is working. Any guess? Am I
missing something?
in update_contact_user method, contact_user is a local variable.