Permalink
Browse files

ActiveRecord#save(false) in rails 3 is deprecated in favor of save(:v…

…alidate => false)
  • Loading branch information...
1 parent ad96043 commit 46633c895dee051b6613ebb87e560135426c2d0d @lightwave committed Oct 4, 2010
@@ -277,7 +277,7 @@ def reset_password
# Resets the password to a random friendly token and then saves the record.
def reset_password!
reset_password
- save_without_session_maintenance(false)
+ save_without_session_maintenance(:validate => false)
end
alias_method :randomize_password!, :reset_password!
@@ -314,7 +314,7 @@ def transition_password?(index, encryptor, crypted, check_against_database)
def transition_password(attempted_password)
self.password = attempted_password
- save(false)
+ save(:validate => false)
end
def require_password?
@@ -91,7 +91,7 @@ def reset_perishable_token
# Same as reset_perishable_token, but then saves the record afterwards.
def reset_perishable_token!
reset_perishable_token
- save_without_session_maintenance(false)
+ save_without_session_maintenance(:validate => false)
end
# A convenience method based on the disable_perishable_token_maintenance configuration option.
@@ -53,7 +53,7 @@ def reset_persistence_token
# Same as reset_persistence_token, but then saves the record.
def reset_persistence_token!
reset_persistence_token
- save_without_session_maintenance(false)
+ save_without_session_maintenance(:validate => false)
end
alias_method :forget!, :reset_persistence_token!
@@ -92,7 +92,7 @@ def persist
def save_record(alternate_record = nil)
r = alternate_record || record
- r.save_without_session_maintenance(false) if r && r.changed? && !r.readonly?
+ r.save_without_session_maintenance(:validaet => false) if r && r.changed? && !r.readonly?
@ajkovar

ajkovar Oct 4, 2010

i'm just casually browsing the commit without much idea of what's going on here.. but validate seems to be misspelled.. i'm guessing thats not intentional

@lightwave

lightwave Oct 12, 2010

Owner

Thanks for catching that. I'll apply a separate patch. In fact, I'm working on a backward compatible patch for Rails 2.3

end
end
end

0 comments on commit 46633c8

Please sign in to comment.