summaryrefslogtreecommitdiff
path: root/users/app/models/remote_email.rb
diff options
context:
space:
mode:
Diffstat (limited to 'users/app/models/remote_email.rb')
-rw-r--r--users/app/models/remote_email.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/users/app/models/remote_email.rb b/users/app/models/remote_email.rb
new file mode 100644
index 0000000..4fe7425
--- /dev/null
+++ b/users/app/models/remote_email.rb
@@ -0,0 +1,14 @@
+class RemoteEmail
+ include CouchRest::Model::Embeddable
+ include Email
+
+ property :email, String
+
+ def username
+ email.spilt('@').first
+ end
+
+ def domain
+ email.split('@').last
+ end
+end