summaryrefslogtreecommitdiff
path: root/users/app/models/user.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-01-18 07:44:57 +0100
committerAzul <azul@leap.se>2013-01-18 07:44:57 +0100
commit27730c7e665ed64e691fdf6dbeebc39c8bfbbc4b (patch)
treecd1df0a9a7d3f0a9812b512cfb93db0f79b0421f /users/app/models/user.rb
parent247a6f14db14543773beb1a1e96f2c335800eb82 (diff)
parent19d563e2e2db98ecc5143229f554df6a09bc457e (diff)
Merge remote-tracking branch 'origin/master' into feature/fixed-email-address
Conflicts: users/app/views/emails/_email.html.haml
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 63f4d0f..292fb13 100644
--- a/users/app/models/user.rb
+++ b/users/app/models/user.rb
@@ -86,6 +86,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
##