diff options
author | jessib <jessib@leap.se> | 2013-01-08 13:20:34 -0800 |
---|---|---|
committer | jessib <jessib@leap.se> | 2013-01-08 13:20:34 -0800 |
commit | 2599c7bac06ee55d58e492a47e09ee163e9582ba (patch) | |
tree | afeb490e23d886c617d339f70d4397e7ad806e89 /users/app/models/user.rb | |
parent | cee6db281349789ba5ff6dc8d3dc6ca10400aebe (diff) |
Adding show view for users.
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 ## |