diff options
author | azul <azul@riseup.net> | 2013-01-17 22:45:39 -0800 |
---|---|---|
committer | azul <azul@riseup.net> | 2013-01-17 22:45:39 -0800 |
commit | 168c36b578d675c99aad62a350aa68cc1b6d1316 (patch) | |
tree | cd1df0a9a7d3f0a9812b512cfb93db0f79b0421f /users/app/models/remote_email.rb | |
parent | 19d563e2e2db98ecc5143229f554df6a09bc457e (diff) | |
parent | 27730c7e665ed64e691fdf6dbeebc39c8bfbbc4b (diff) |
Merge pull request #18 from leapcode/feature/fixed-email-address
make email address just login@domain.tld
Diffstat (limited to 'users/app/models/remote_email.rb')
-rw-r--r-- | users/app/models/remote_email.rb | 14 |
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 |