Skip to content

Loading…

Will Paginate is broken on Rails 3 #25

Closed
lifo opened this Issue · 4 comments

4 participants

@lifo

WP uses scope(:select), which is no longer there in Rails 3. You can find the patch at https://gist.github.com/47104a3bda7f48e8ac70

I also noticed that paginate_by_sql uses add_limit!, which is gone too. So you might wanna check that.

Thanks.

@rubys

Patch is now stale, twice over.

uninitialized constant ActiveRecord::Calculations::CALCULATIONS_OPTIONS at will_paginate/lib/will_paginate/finder.rb:191:in `wp_count'

and

"can't convert nil into Array", partial traceback:
will_paginate (2.3.11) lib/will_paginate/collection.rb:135:in replace'
will_paginate (2.3.11) lib/will_paginate/collection.rb:135:in
replace'
will_paginate (2.3.11) lib/will_paginate/finder.rb:82:in paginate'
will_paginate (2.3.11) lib/will_paginate/collection.rb:87:in
create'
will_paginate (2.3.11) lib/will_paginate/finder.rb:76:in paginate'
vendor/rails/actionpack/lib/action_controller/base.rb:46:in
send_action'
vendor/rails/actionpack/lib/action_controller/base.rb:46:in send_action'
vendor/rails/actionpack/lib/abstract_controller/base.rb:145:in
process_action'
vendor/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in process_action'
vendor/rails/activesupport/lib/active_support/callbacks.rb:433:in
run__4610131__process_action__625616856__callbacks'
vendor/rails/activesupport/lib/active_support/callbacks.rb:403:in send'
vendor/rails/activesupport/lib/active_support/callbacks.rb:403:in
run_process_action_callbacks'
vendor/rails/activesupport/lib/active_support/callbacks.rb:88:in send'
vendor/rails/activesupport/lib/active_support/callbacks.rb:88:in
run_callbacks'
vendor/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in process_action'
vendor/rails/actionpack/lib/action_controller/metal/rendering.rb:12:in
process_action'
vendor/rails/actionpack/lib/action_controller/metal/compatibility.rb:70:in process_action'
vendor/rails/actionpack/lib/action_controller/metal/instrumentation.rb:28:in
process_action'
vendor/rails/activesupport/lib/active_support/notifications/instrumenter.rb:18:in instrument'
vendor/rails/activesupport/lib/active_support/notifications.rb:49:in
__send
'
vendor/rails/activesupport/lib/active_support/notifications.rb:49:in `instrument'

@rubys

Results of running against the latest master of 3.0pre can be found at:

http://intertwingly.net/projects/AWDwR3/checkdepot.html#section-23.3

@jackdempsey

yeah, seeing this blowing things up for me now:

uninitialized constant ActiveRecord::Calculations::CALCULATIONS_OPTIONS

@mislav
Owner

pushed will_paginate 3.0.pre for Rails 3. if you really need to stick on the 2.3.x branch of will_paginate, use dhh's fork. later I'm going to backport Rails 3 compat to 2.3-stable. closing

This issue was closed.
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.