localize invite model

This commit is contained in:
wvengen 2013-02-27 11:59:03 +01:00
parent 2d1ae0ad97
commit d9949681a2
3 changed files with 8 additions and 1 deletions

View file

@ -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