diff options
author | Azul <azul@riseup.net> | 2016-03-31 11:40:44 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-03-31 11:40:44 +0200 |
commit | be5efb57dc9b282a31cf29c9eac27cb5a7e7ac2f (patch) | |
tree | ce8bee7d2fa4007a1db9815e1af001fe44e329c1 /app/models/user.rb | |
parent | 14c9f2ab7cbf410bcd7fdd75b4a1c11417b30bd7 (diff) | |
parent | 48acca107b9bd7a59bacb1449b042eb753e63917 (diff) |
Merge remote-tracking branch 'github/211' into develop
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 61793be..51e9279 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -68,8 +68,10 @@ class User < CouchRest::Model::Base def to_json(options={}) { - :login => login, - :ok => valid? + :login => self.login, + :ok => self.valid?, + :id => self.id, + :enabled => self.enabled? }.to_json(options) end @@ -107,6 +109,10 @@ class User < CouchRest::Model::Base false end + def is_monitor? + false + end + def most_recent_tickets(count=3) Ticket.for_user(self).limit(count).all #defaults to having most recent updated first end |