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

app/models/message.rb

index f0c2001724c544be4cd22ebb583e4a77fe1c52a8..3866a3a04c8033fb823f8f21ddf5bbd6ca292d5f 100644 (file)
@@ -54,7 +54,7 @@ class Message < ActiveRecord::Base
 
   def cannot_reply_to_locked_topic
     # Can not reply to a locked topic
-    errors.add_to_base 'Topic is locked' if root.locked? && self != root
+    errors.add :base, 'Topic is locked' if root.locked? && self != root
   end
 
   def update_parent_last_reply