diff options
Diffstat (limited to 'users/app/models/user.rb')
-rw-r--r-- | users/app/models/user.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/users/app/models/user.rb b/users/app/models/user.rb index 1798ea4..4b6b06c 100644 --- a/users/app/models/user.rb +++ b/users/app/models/user.rb @@ -100,6 +100,10 @@ class User < CouchRest::Model::Base email_aliases.build(attrs.values.first) if attrs end + def most_recent_tickets(count=3) + Ticket.for_user(self).limit(count) #defaults to having most recent updated first + end + protected ## |