Skip to content

Instantly share code, notes, and snippets.

@tobyhede tobyhede/tap.rb
Last active Jan 2, 2016

Embed
What would you like to do?
To tap or not to tap ...
#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
You can’t perform that action at this time.