summaryrefslogtreecommitdiff
path: root/users/app
diff options
context:
space:
mode:
Diffstat (limited to 'users/app')
-rw-r--r--users/app/models/email.rb4
-rw-r--r--users/app/models/local_email.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/users/app/models/email.rb b/users/app/models/email.rb
index 1bcff1c..89c31bb 100644
--- a/users/app/models/email.rb
+++ b/users/app/models/email.rb
@@ -19,4 +19,8 @@ class Email < String
self
end
+ def handle
+ self.split('@').first
+ end
+
end
diff --git a/users/app/models/local_email.rb b/users/app/models/local_email.rb
index c1f7c11..6303bb6 100644
--- a/users/app/models/local_email.rb
+++ b/users/app/models/local_email.rb
@@ -20,10 +20,6 @@ class LocalEmail < Email
[handle]
end
- def handle
- gsub(/@#{domain}/i, '')
- end
-
def domain
LocalEmail.domain
end