Skip to content

Instantly share code, notes, and snippets.

@renandincer
Created March 7, 2016 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renandincer/80aad3e2c05c8422d56c to your computer and use it in GitHub Desktop.
Save renandincer/80aad3e2c05c8422d56c to your computer and use it in GitHub Desktop.
require 'mango'
def generate_login_token
self.login_token = SecureRandom.urlsafe_base64(16,false)
self.login_token_gen = Time.now
self.save
return self.login_token
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment