diff options
Diffstat (limited to 'users/app/models')
-rw-r--r-- | users/app/models/email_alias.rb | 6 | ||||
-rw-r--r-- | users/app/models/user.rb | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/users/app/models/email_alias.rb b/users/app/models/email_alias.rb new file mode 100644 index 0000000..25e4b27 --- /dev/null +++ b/users/app/models/email_alias.rb @@ -0,0 +1,6 @@ +class EmailAlias + include CouchRest::Model::Embeddable + + property :email, String + timestamps! +end diff --git a/users/app/models/user.rb b/users/app/models/user.rb index ae271ce..81d5262 100644 --- a/users/app/models/user.rb +++ b/users/app/models/user.rb @@ -1,11 +1,13 @@ class User < CouchRest::Model::Base property :login, String, :accessible => true - property :email, String, :accessible => true - property :email_forward, String, :accessible => true property :password_verifier, String, :accessible => true property :password_salt, String, :accessible => true + property :email, String, :accessible => true + property :email_forward, String, :accessible => true + property :email_aliases, [EmailAlias] + validates :login, :password_salt, :password_verifier, :presence => true |