Update customers_controller.rb

This commit is contained in:
2016-04-27 07:35:02 -04:00
parent 4f9a3ed046
commit 8374f0ae3e

View File

@@ -18,7 +18,12 @@ class CustomersController < ApplicationController
# display a list of all customers # display a list of all customers
def index def index
@customer_pages, @customers = paginate QboCustomer.all c = QboCustomer.all
@customer_count = c.count
@customer_pages = Paginator.new self, @customer_count, 10, params['page']
@customers = c.all.sort(:limit => @customer_pages.items_per_page, :offset => @customer_pages.current.offset)
end end
# display a specific customer # display a specific customer