localize invite model
This commit is contained in:
parent
2d1ae0ad97
commit
d9949681a2
3 changed files with 8 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ class Invite < ActiveRecord::Base
|
|||
# Custom validation: check that email does not already belong to a registered user.
|
||||
def email_not_already_registered
|
||||
unless User.find_by_email(self.email).nil?
|
||||
errors.add(:email, 'ist bereits in Verwendung. Person ist schon Mitglied der Foodcoop.')
|
||||
errors.add(:email, I18n.t('invites.errors.already_member'))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue