Skip to content

Instantly share code, notes, and snippets.

@lcowell
Created December 22, 2011 20:16
Show Gist options
  • Save lcowell/1511680 to your computer and use it in GitHub Desktop.
Save lcowell/1511680 to your computer and use it in GitHub Desktop.
def configure(token)
user = User.find_by_token(token)
user.update_attributes(:confirmed => true) if user
user
end
def configure(token)
User.find_by_token(token).tap do |user|
user.update_attributes(:confirmed => true) if user
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment