Created
December 17, 2010 17:37
-
-
Save rwc9u/745337 to your computer and use it in GitHub Desktop.
Getting before_validations to run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# added a new before_validation | |
PhoneNumber.all { |p| p.save! } | |
# doesn't resave the data... silly me | |
ActiveRecord::Base.partial_updates = false | |
PhoneNumber.all { |p| p.valid?; p.save! } | |
# now we are talking |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment