Created
April 8, 2013 13:14
-
-
Save mhupman/5336685 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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