module

Paginator

Constants

DEFAULT = Hash(Symbol, Array(Symbol) | Bool | Int32 | String | Symbol).new

First, define the DEFAULT hash correctly

VERSION = "0.1.0"

Class methods

config
Source
config=(hash)
Source
db

Add class property for database configuration

Source
db=(db : DB::Database | Nil)

Add class property for database configuration

Source
paginate(page : Int32 = 1, per_page : Int32 = 12, order : String = "created_at DESC")

In the Post.paginate method:

Source

Nested types