Rails3: model: replace deprecated errors.add_to_base at validate_on_create of User

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7608 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-10-07 12:25:20 +00:00
parent 7183530e7a
commit d986a35a9b
1 changed files with 1 additions and 1 deletions

View File

@ -597,7 +597,7 @@ class AnonymousUser < User
def validate_on_create
# There should be only one AnonymousUser in the database
errors.add_to_base 'An anonymous user already exists.' if AnonymousUser.find(:first)
errors.add :base, 'An anonymous user already exists.' if AnonymousUser.find(:first)
end
def available_custom_fields