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