From e4c7f2fb8fa2833037508f1b88f802944855fd77 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 10 Dec 2012 10:38:48 +0100 Subject: actually allow adding email aliases --- users/app/models/user.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'users/app/models') diff --git a/users/app/models/user.rb b/users/app/models/user.rb index 81d5262..3ad69c7 100644 --- a/users/app/models/user.rb +++ b/users/app/models/user.rb @@ -75,6 +75,13 @@ class User < CouchRest::Model::Base APP_CONFIG['admins'].include? self.login end + def email_aliases_attributes=(attrs) + if attrs + email_alias = EmailAlias.new(attrs.values.first) + email_aliases << email_alias + end + end + protected def password password_verifier -- cgit v1.2.3