For instance, I have got a Comapny model. I can get per page limit of 10 in the way as below?
class Client::CompanyController < ApplicationController
def company_search
@companies = Company.all.page(params[:page],:per_page=>10)
end
end
For instance, I have got a Comapny model. I can get per page limit of 10 in the way as below?
class Client::CompanyController < ApplicationController
def company_search
@companies = Company.all.page(params[:page],:per_page=>10)
end
end
You can user will_paginate gem and than in your controller You can put:
and in Your view: