#269 ✓resolved
Anton Ageev

Problem with Ruby 1.9.x

Reported by Anton Ageev | May 6th, 2009 @ 05:26 PM

In Ruby 1.9.x WillPaginate::Finder::ClassMethods#wp_count doesn't remove :include options in following code:

# forget about includes if they are irrelevant (Rails 2.1)
if count_options[:include] and
    klass.private_methods.include?('references_eager_loaded_tables?') and
    !klass.send(:references_eager_loaded_tables?, count_options)
  count_options.delete :include
end

klass.private_methods in ruby 1.8.x returns strings, in ruby 1.9.x returns symbols.

Oneline patch:

- klass.private_methods.include?('references_eager_loaded_tables?')
+ klass.private_methods.map { |n| n.to_sym }.include?(:references_eager_loaded_tables?)

Comments and changes to this ticket

  • Mislav

    Mislav May 20th, 2009 @ 11:42 AM

    • State changed from “new” to “resolved”

    thanks for reporting. I have implemented checks in both master and agnostic branches

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 ยป

Everyone's favorite Ruby library for pagination of practically anything!

People watching this ticket

Pages