summaryrefslogtreecommitdiff
path: root/help/app/controllers/tickets_controller.rb
diff options
context:
space:
mode:
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)