Created
September 5, 2016 13:21
-
-
Save dereknguyen269/7b9bbb78c079143ea4d52645dee016f0 to your computer and use it in GitHub Desktop.
This file contains 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
p1 = Person.find(1) | |
p2 = Person.find(1) | |
p1.first_name = "Michael" | |
p1.save | |
p2.first_name = "should fail" | |
p2.save # Raises a ActiveRecord::StaleObjectError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment