summaryrefslogtreecommitdiff
path: root/help/app/controllers/tickets_controller.rb
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2012-11-29 15:56:41 -0800
committerjessib <jessib@leap.se>2012-11-29 15:56:41 -0800
commit0a49faf417a993e838d1c37361d573bb86223f75 (patch)
tree3e638f0ee2f0c9bd74758845f627b8ac42cc03e7 /help/app/controllers/tickets_controller.rb
parente78b4e7af81d6350b9064a977e1990d9a6f1408c (diff)
Not yet done, but more sophisticated and refactored ticket filtering. Still have to do more, including allowing user to pick sort order.
Diffstat (limited to 'help/app/controllers/tickets_controller.rb')
-rw-r--r--help/app/controllers/tickets_controller.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/help/app/controllers/tickets_controller.rb b/help/app/controllers/tickets_controller.rb
index 2e55c36..1a73df9 100644
--- a/help/app/controllers/tickets_controller.rb
+++ b/help/app/controllers/tickets_controller.rb
@@ -82,11 +82,8 @@ class TicketsController < ApplicationController
def index
#TODO: we will need pagination
- if admin?
- @tickets = Ticket.for_admin(current_user, params)
- else
- @tickets = Ticket.for_user(current_user, params)
- end
+ @tickets = Ticket.for_user(current_user, params, admin?)
+
#below works if @tickets is a CouchRest::Model::Designs::View, but not if it is an Array
@tickets = @tickets.page(params[:page]).per(10) #TEST
#respond_with(@tickets)