From feee17e3a9970ac04f5a789255fbf4c3e8e89eb8 Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 13 Dec 2012 17:15:14 +0100 Subject: use the same partial for Email and LocalEmail --- users/app/models/local_email.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/users/app/models/local_email.rb b/users/app/models/local_email.rb index 5762a33..7cca4f4 100644 --- a/users/app/models/local_email.rb +++ b/users/app/models/local_email.rb @@ -2,6 +2,10 @@ class LocalEmail < Email validate :unique_on_server + def to_partial_path + "emails/email" + end + def unique_on_server has_email = User.find_by_email_or_alias(email) if has_email && has_email != self.base_doc -- cgit v1.2.3