rom-rb / rom-rb.org

The official rom-rb website
https://rom-rb.org/
45 stars 108 forks source link

Missing docs for pagination plugin #270

Closed thomas closed 4 years ago

thomas commented 5 years ago

Can't find any documentation about the pagination plugin, how to enable it, etc.

solnic commented 5 years ago

Thanks, we should definitely cover that in SQL docs. For the time being, all you need is this:

class YourRel < ROM::Relation[:sql]
  use :pagination
  per_page 20 # that's optional, defaults to 10
end

Instance API is documented here.

solnic commented 4 years ago

Closing because as it was reported as https://github.com/rom-rb/rom-sql/issues/359