ruby on rails - Kaminari custom config per page -
i have on kaminari config:
kaminari.configure |config| config.default_per_page = 50 end
and want set custom value per page action:
@my_models = mymodel.all.per(20)
i set this:
@my_models = mymodel.all.per(kaminari.my_custom_per_page)
because change test action less objects. possible?
class mymodel < activerecord::base
paginates_per 20
...
end
Comments
Post a Comment