fixes for upgrade schema script

This commit is contained in:
albert
2011-11-06 10:12:23 -05:00
parent c478eb33b6
commit 5158d1b274
15 changed files with 3756 additions and 274 deletions

View File

@@ -26,7 +26,6 @@ class User < ActiveRecord::Base
validates_confirmation_of :password
validates_presence_of :email, :if => lambda {|rec| rec.new_record? && Danbooru.config.enable_email_verification?}
validate :validate_ip_addr_is_not_banned, :on => :create
before_validation :convert_blank_email_to_null
before_validation :normalize_blacklisted_tags
before_create :encrypt_password_on_create
before_update :encrypt_password_on_update
@@ -303,12 +302,6 @@ class User < ActiveRecord::Base
raise User::Error.new("Verification key does not match")
end
end
def convert_blank_email_to_null
if email.blank?
self.email = nil
end
end
end
module BlacklistMethods