Created
September 5, 2016 13:25
-
-
Save dereknguyen269/c8c297b7b7e74e8321ec82d756d0fa3f 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
account = Account.find_by_user_id(5) | |
account.lock! | |
#no other users can read this account, they have to wait until the lock is released | |
account.save! | |
#lock is released, other users can read this account |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment