amatsuda/kaminari — pull request #334 by misterbojangles (2013-01-07 22:20:18+00:00)
Title: Make kaminari more robust against invalid input values

As proposed in the documentation, kaminari methods are often called in the controller with "unsanitized" parameters from the *params* hash (e.g. `User.order(:name).page params[:page]`). However, this makes the app vulnerable to invalid input: a request with an array instead of an integer (e.g. `...?page[]=2`) causes the app to raise an exception.

I suggest to handle invalid input values within kaminari and attach a fix for the `per` parameter.

Thanks for your consideration,
Boris