Skip to content

Instantly share code, notes, and snippets.

@jgaskins
Created April 9, 2013 17:31
Show Gist options
  • Save jgaskins/5347665 to your computer and use it in GitHub Desktop.
Save jgaskins/5347665 to your computer and use it in GitHub Desktop.
Here's my password, so hash it maybe?
require 'bcrypt'
class User
attr_reader :email, :password
def initialize attributes={}
@email = attributes[:email]
@password = BCrypt::Password.create(attributes[:password]).to_s
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment