leikind / wice_grid

A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters
MIT License
537 stars 215 forks source link

allow user to set the kaminari page method #161

Closed ashanbrown closed 9 years ago

ashanbrown commented 9 years ago

So I'm trying to put wice_grid into an app that uses will_paginate. Rather than changing everything over to kaminari (which might not be a bad idea), I'm trying to use both simultaneously. Kaminari supports config.page_method_name = <method_symbol> that allows you to use a method other than page to do your paginatation. I've set this up, but wice_grid expects the kaminari page method to be called page. I suppose we could get the method from kamanari itself but I thought it might be simplest just to add an option to set the name of the page method, both in the defaults so it can be set at config time, as well as when setting up the grid (just because, really). I can add tests if you like but I was not sure how to handle that since tests are in a different repo. Thanks for your consideration and so far your gem is looking great. I look forward to using it more.