mislav/will_paginate

NoMethodError: undefined method `will_paginate'

stephaniewilkinson opened this issue · 3 comments

Hi there!

I have a roda app: https://github.com/stephaniewilkinson/yonderbook/pull/210/files

My steps:

  1. Added the gem to my gem file
  2. Bundled
  3. Required both 'will_paginate' and 'will_paginate/array' in my app.rb
  4. Required 'will_paginate' in my config.ru
  5. In app.rb i'm using the paginate method

In my view i'm using <%= will_paginate @posts %> and i'm getting undefined method 'will_paginate'.

I've also tried running will_paginate @posts in my app.rb and I'm getting the same issue.

Why am i able to use the paginate method but not will_paginate?

I took a quick look and I think (not sure) that will_paginate helper methods defined for some set of frameworks and Roda is not one of them.

Maybe you can use gem compatible with Roda such as this one

If this ^^ is true, then maybe it can be added via feature request (up to maintainer(s) to decide).

Thank you @codeminator 🙇

thanks @codeminator! I didn't know about that gem