Skip to content

Instantly share code, notes, and snippets.

@mhupman
Created April 8, 2013 13:14
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 mhupman/5336685 to your computer and use it in GitHub Desktop.
Save mhupman/5336685 to your computer and use it in GitHub Desktop.
class User < ActiveRecord::Base
attr_accessible :username, :password
attr_accessor :password
def password=(password)
self.password_salt = "salty"
self.password_hash = "#{password}#{self.password_salt}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment