]> source.dussan.org Git - redmine.git/commitdiff
Rails3: model: replace deprecated errors.add_to_base at validate_on_create of User
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 7 Oct 2011 12:25:20 +0000 (12:25 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 7 Oct 2011 12:25:20 +0000 (12:25 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7608 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/user.rb

index b3622024e6bd431c0d400d660858281a985d94d1..0ac0dcb748b051972d3dbc986967fe85151ce2f5 100644 (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