Will Paginate is broken on Rails 3 #25

Closed
lifo opened this Issue Jan 16, 2010 · 4 comments

Comments

Projects
None yet
4 participants
@lifo
Contributor

lifo commented Jan 16, 2010

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

This comment has been minimized.

Show comment
Hide comment
@rubys

rubys Jan 20, 2010

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:inreplace'
will_paginate (2.3.11) lib/will_paginate/finder.rb:82:in paginate' will_paginate (2.3.11) lib/will_paginate/collection.rb:87:increate'
will_paginate (2.3.11) lib/will_paginate/finder.rb:76:in paginate' vendor/rails/actionpack/lib/action_controller/base.rb:46:insend_action'
vendor/rails/actionpack/lib/action_controller/base.rb:46:in send_action' vendor/rails/actionpack/lib/abstract_controller/base.rb:145:inprocess_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:inrun_callbacks'
vendor/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in process_action' vendor/rails/actionpack/lib/action_controller/metal/rendering.rb:12:inprocess_action'
vendor/rails/actionpack/lib/action_controller/metal/compatibility.rb:70:in process_action' vendor/rails/actionpack/lib/action_controller/metal/instrumentation.rb:28:inprocess_action'
vendor/rails/activesupport/lib/active_support/notifications/instrumenter.rb:18:in instrument' vendor/rails/activesupport/lib/active_support/notifications.rb:49:insend'
vendor/rails/activesupport/lib/active_support/notifications.rb:49:in `instrument'

rubys commented Jan 20, 2010

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:inreplace'
will_paginate (2.3.11) lib/will_paginate/finder.rb:82:in paginate' will_paginate (2.3.11) lib/will_paginate/collection.rb:87:increate'
will_paginate (2.3.11) lib/will_paginate/finder.rb:76:in paginate' vendor/rails/actionpack/lib/action_controller/base.rb:46:insend_action'
vendor/rails/actionpack/lib/action_controller/base.rb:46:in send_action' vendor/rails/actionpack/lib/abstract_controller/base.rb:145:inprocess_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:inrun_callbacks'
vendor/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in process_action' vendor/rails/actionpack/lib/action_controller/metal/rendering.rb:12:inprocess_action'
vendor/rails/actionpack/lib/action_controller/metal/compatibility.rb:70:in process_action' vendor/rails/actionpack/lib/action_controller/metal/instrumentation.rb:28:inprocess_action'
vendor/rails/activesupport/lib/active_support/notifications/instrumenter.rb:18:in instrument' vendor/rails/activesupport/lib/active_support/notifications.rb:49:insend'
vendor/rails/activesupport/lib/active_support/notifications.rb:49:in `instrument'

@rubys

This comment has been minimized.

Show comment
Hide comment
@rubys

rubys Jan 20, 2010

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

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

rubys commented Jan 20, 2010

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

This comment has been minimized.

Show comment
Hide comment
@jackdempsey

jackdempsey Feb 4, 2010

yeah, seeing this blowing things up for me now:

uninitialized constant ActiveRecord::Calculations::CALCULATIONS_OPTIONS

yeah, seeing this blowing things up for me now:

uninitialized constant ActiveRecord::Calculations::CALCULATIONS_OPTIONS

@mislav

This comment has been minimized.

Show comment
Hide comment
@mislav

mislav Feb 5, 2010

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

Owner

mislav commented Feb 5, 2010

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