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 f20c6ac..1e8ee0e 100644 --- a/users/app/models/user.rb +++ b/users/app/models/user.rb @@ -94,6 +94,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).all #defaults to having most recent updated first + end + protected ## |