summaryrefslogtreecommitdiff
path: root/users/app/models/user.rb
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2013-01-08 13:20:34 -0800
committerjessib <jessib@leap.se>2013-01-08 13:20:34 -0800
commit2599c7bac06ee55d58e492a47e09ee163e9582ba (patch)
treeafeb490e23d886c617d339f70d4397e7ad806e89 /users/app/models/user.rb
parentcee6db281349789ba5ff6dc8d3dc6ca10400aebe (diff)
Adding show view for users.
Diffstat (limited to 'users/app/models/user.rb')
-rw-r--r--users/app/models/user.rb4
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
##