summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-05-29 10:04:07 +0200
committerAzul <azul@leap.se>2014-05-29 10:04:07 +0200
commite0d31118d6e4110d2c280afa9415cfe9def29deb (patch)
treeffa589ee7df174d0eaa20cec254a7251f425f402 /app/models/user.rb
parent016e61ce9ab44cf58355e843b0c0d0085d373fc7 (diff)
hand on errors from Email to Identity to User
errors.each iterates through all errors for all attrbibutes nicely.
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 33508b5..84a795e 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -167,10 +167,10 @@ class User < CouchRest::Model::Base
##
def identity_is_valid
- refresh_identity
return if identity.valid?
- # hand on the first error only for now
- self.errors.add(:login, identity.errors.messages.values.first)
+ identity.errors.each do |attribute, error|
+ self.errors.add(:login, error)
+ end
end
def password