Module: ResourcesController::WillPaginate

Extended by:
ActiveSupport::Concern
Defined in:
app/concerns/resources_controller/will_paginate.rb

Overview

Setting the pagination size in the controller:

# app/controllers/posts_controller.rb
class PostsController < ApplicationController
  # ...
  private

  def per_page
    15
  end
end

Instance Method Summary collapse

Instance Method Details

#paginate?Boolean


21
22
23
# File 'app/concerns/resources_controller/will_paginate.rb', line 21

def paginate?
  true
end