In the following code, what does save(false)
do?
def create_reset_code!
@reset = true
self.attributes = {:reset_code => Digest::SHA1.hexdigest( Time.now.to_s.split(//).sort_by {rand}.join )}
save(false)
end
If it's for updating the credentials, then why do they include false
?
save(false)
bypasses validations for the model object being saved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With