summaryrefslogtreecommitdiff
path: root/users/app/models
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-12-13 16:13:32 +0100
committerAzul <azul@leap.se>2012-12-13 17:15:41 +0100
commitaed03c04270bc9b7d48048ffb2f24fecc993c7ac (patch)
treeaee41c3bb73bf5167fb5b161ea159f82195d4535 /users/app/models
parent577c3d8149acbd483120847b994582268f93c0b3 (diff)
refactor: changed add_email to add_email_alias
that's what it does. Changed all tests to use it instead of the attributes method
Diffstat (limited to 'users/app/models')
-rw-r--r--users/app/models/user.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/users/app/models/user.rb b/users/app/models/user.rb
index b531dfd..4fd0039 100644
--- a/users/app/models/user.rb
+++ b/users/app/models/user.rb
@@ -112,7 +112,7 @@ class User < CouchRest::Model::Base
APP_CONFIG['admins'].include? self.login
end
- def add_email(email)
+ def add_email_alias(email)
email = LocalEmail.new(email) unless email.is_a? Email
email_aliases << email
end
@@ -121,7 +121,7 @@ class User < CouchRest::Model::Base
# All the ui needs for now.
def email_aliases_attributes=(attrs)
if attrs && attrs.values.first
- add_email attrs.values.first
+ add_email_alias attrs.values.first
end
end