diff options
author | Azul <azul@leap.se> | 2012-12-13 17:15:14 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2012-12-13 17:15:41 +0100 |
commit | feee17e3a9970ac04f5a789255fbf4c3e8e89eb8 (patch) | |
tree | 7033ae440ba959a49ea7b7bc4e078dd2b2378187 | |
parent | aed03c04270bc9b7d48048ffb2f24fecc993c7ac (diff) |
use the same partial for Email and LocalEmail
-rw-r--r-- | users/app/models/local_email.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 |