I have following piece of code
@user = User.find(params[:id])
if (@user.activation_status == "active")
#some code here
@user.update_attribute('activation_status' ,'inactive') # Line 44
#send mail to user that his account is Acivated
else
end
Is there any chance that Line 44
could fail? Because database memory is full or network failure. What will happen in that case? If that creates a problem, what is a better way to avoid it? What does update_attribute
return if it failed?