Last active
January 2, 2016 08:29
-
-
Save tobyhede/8277029 to your computer and use it in GitHub Desktop.
To tap or not to tap ...
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
#assuming a method returning an account | |
Account.where(email: email).first_or_create.tap do |account| | |
account.update_attributes!(name: name, login: login, image: image) | |
end | |
account = Account.where(email: email).first_or_create | |
account.update_attributes!(name: name, login: login, image: image) | |
account |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment