Update customers_controller.rb

This commit is contained in:
2016-04-27 07:54:18 -04:00
parent c053c91a64
commit 0d367245ce

View File

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