I'm using Kaminari gem for pagination.
I have an exception when trying to run such code:
Distributor.all.page(123123213213132113322)
=> ActiveRecord::StatementInvalid (Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '3078080330328302833025' at line 1: SELECT
distributors.* FROMdistributorsLIMIT 11 OFFSET 3078080330328302833025)
I've already tried to add such config into initializer, but it doesn't help:
Kaminari.configure do |config|
config.max_pages = 1000000000
end
What it the right way to limit max pages forcibly on #page method call or is any other way just to avoid such exception?