Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Upgrading from will_paginate 3.0.pre2 to 3.0.1/2 #219

johnkelly opened this Issue · 1 comment

2 participants


I'm trying to upgrade the will_paginate gem to the latest version to remove the warning message that appears when running rake in rails 3.1. After upgrading the gem, I'm getting several spec failures and I can't understand what is causing them to work in will_paginate 3.0.pre2 but not in 3.0.1 or 3.0.2.

The environment is in Ruby 1.8.7EE and Rails 3.1.3

Spec Failure Examples:

Message: undefined method "paginate" for #<Array:0x10f45b298>
Code: ```teachers.uniq.paginate :page => params[:page], :order => "lower(last_name) ASC"```
Where teachers is an array

Message: undefined method "paginate" for #<Array:0x10f45b298>
Code: ``` Program.all.sort_by { |p| p.full_title }.paginate :page => params[:page]```

Message: undefined method "paginate" for #<Array:0x10f45b298>
Code: ```Staffer.students(params[:search][:teacher_email], @subscriber).paginate :page => params[:page]```

It's documented on the wiki

Static arrays aren't paginateable by default. You have to require "will_paginate/array" to be able to paginate static arrays. You can do so in your test helper file.

@mislav mislav closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.