module Zobi::Paginated
This module helps you to paginate your collection using kaminari
Public Class Methods
included(base)
click to toggle source
# File lib/zobi/paginated.rb, line 8 def self.included base base.send :responders, 'zobi/responders/pagination' end
Protected Instance Methods
paginate_per()
click to toggle source
# File lib/zobi/paginated.rb, line 14 def paginate_per params[:per] end
Private Instance Methods
paginated_collection(c)
click to toggle source
# File lib/zobi/paginated.rb, line 20 def paginated_collection c c.page(params[:page]).per(paginate_per) end