#663 ✓duplicate
Kieran P

:paginate => false on index raises will_paginate exception

Reported by Kieran P | March 6th, 2010 @ 08:26 AM

When you add :paginate => false to an index page, it throws this error:

undefined method `total_pages' for []:Array
http://pastie.org/856939 (full stack trace)

Steps to reproduce:

hobo broken_paginate
script/generate hobo_model_resource Category name:string
script/generate hobo_migration

Add this to app/controllers/categories_controller.rb

  def index
    hobo_index :paginate => false
  end

Start the server, then access /categories

Comments and changes to this ticket

  • Matt Jones

    Matt Jones March 7th, 2010 @ 10:51 PM

    • State changed from “new” to “duplicate”

    This is a common problem - in short, the automatic index-page code doesn't know you've turned pagination off. See #621 for a link to some discussion and solutions.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages