diff options
author | jessib <jessib@leap.se> | 2012-11-29 15:56:41 -0800 |
---|---|---|
committer | jessib <jessib@leap.se> | 2012-11-29 15:56:41 -0800 |
commit | 0a49faf417a993e838d1c37361d573bb86223f75 (patch) | |
tree | 3e638f0ee2f0c9bd74758845f627b8ac42cc03e7 /help/app/controllers/tickets_controller.rb | |
parent | e78b4e7af81d6350b9064a977e1990d9a6f1408c (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.rb | 7 |
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) |