summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-10-31 10:40:03 +0100
committerAzul <azul@leap.se>2012-10-31 10:40:03 +0100
commit5acc88d8a376b2e25e5230d8174667106754c786 (patch)
tree38d6048e75c2be2bb1ee90e992718eedb1465b6b
parentf2825d10e6447ea766fee085841e2b92b0477976 (diff)
user creation should send ok flag so js can start login
-rw-r--r--users/app/models/user.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/users/app/models/user.rb b/users/app/models/user.rb
index 1afb9db..737e083 100644
--- a/users/app/models/user.rb
+++ b/users/app/models/user.rb
@@ -44,7 +44,10 @@ class User < CouchRest::Model::Base
end
def to_json(options={})
- super(options.merge(:only => ['login', 'password_salt']))
+ {
+ :login => login,
+ :ok => valid?
+ }.to_json(options)
end
def initialize_auth(aa)