set protected attribute so that the email gets saved

master
Coleman 2008-10-17 02:58:41 -05:00
parent 08a199c160
commit a2de855eb6
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ class Photo < ActiveRecord::Base
# Renders the email into a hashed string for later retrieval.
#
def hashify_email
email_hash = User.salted_string(email) unless email.to_s.empty?
self.email_hash = User.salted_string(email) if self.email_hash.to_s.empty? and !email.to_s.empty?
true
end