Commit 48fc7d7f7eb532196b2f9c5c6400bd6afe7ef1a7
1 parent
c74b012c
Exists in
master
and in
22 other branches
rails3: update errors add_to_base api
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/models/article.rb
| ... | ... | @@ -396,7 +396,7 @@ class Article < ActiveRecord::Base |
| 396 | 396 | |
| 397 | 397 | def native_translation_must_have_language |
| 398 | 398 | unless self.translation_of.nil? |
| 399 | - errors.add_to_base(N_('A language must be choosen for the native article')) if self.translation_of.language.blank? | |
| 399 | + errors.add(:base, N_('A language must be choosen for the native article')) if self.translation_of.language.blank? | |
| 400 | 400 | end |
| 401 | 401 | end |
| 402 | 402 | ... | ... |
app/models/invitation.rb
| ... | ... | @@ -35,7 +35,7 @@ class Invitation < Task |
| 35 | 35 | super |
| 36 | 36 | email = friend ? friend.user.email : friend_email |
| 37 | 37 | if person && email && person.user.email == email |
| 38 | - self.errors.add_to_base(_("You can't invite youself")) | |
| 38 | + self.errors.add(:base, _("You can't invite youself")) | |
| 39 | 39 | end |
| 40 | 40 | end |
| 41 | 41 | ... | ... |