Skip to content

Instantly share code, notes, and snippets.

@ethagnawl
Created December 13, 2017 21:30
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 ethagnawl/c1bdede0cb7adee8d68a5c4cc963d6c3 to your computer and use it in GitHub Desktop.
Save ethagnawl/c1bdede0cb7adee8d68a5c4cc963d6c3 to your computer and use it in GitHub Desktop.
devise random password generator
module Devise
def self.generate_password
SecureRandom.hex(1).upcase << SecureRandom.hex(DEVISE_PASSWORD_MIN)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment