From 48fc7d7f7eb532196b2f9c5c6400bd6afe7ef1a7 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Tue, 19 Nov 2013 16:47:12 +0000 Subject: [PATCH] rails3: update errors add_to_base api --- app/models/article.rb | 2 +- app/models/invitation.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/article.rb b/app/models/article.rb index 93a8b86..27f8353 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -396,7 +396,7 @@ class Article < ActiveRecord::Base def native_translation_must_have_language unless self.translation_of.nil? - errors.add_to_base(N_('A language must be choosen for the native article')) if self.translation_of.language.blank? + errors.add(:base, N_('A language must be choosen for the native article')) if self.translation_of.language.blank? end end diff --git a/app/models/invitation.rb b/app/models/invitation.rb index 24425f9..2ad96ef 100644 --- a/app/models/invitation.rb +++ b/app/models/invitation.rb @@ -35,7 +35,7 @@ class Invitation < Task super email = friend ? friend.user.email : friend_email if person && email && person.user.email == email - self.errors.add_to_base(_("You can't invite youself")) + self.errors.add(:base, _("You can't invite youself")) end end -- libgit2 0.21.2