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:
parent
7183530e7a
commit
d986a35a9b
|
@ -597,7 +597,7 @@ class AnonymousUser < User
|
||||||
|
|
||||||
def validate_on_create
|
def validate_on_create
|
||||||
# There should be only one AnonymousUser in the database
|
# 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
|
end
|
||||||
|
|
||||||
def available_custom_fields
|
def available_custom_fields
|
||||||
|
|
Loading…
Reference in New Issue