Code Monkey home page Code Monkey logo

Comments (12)

joe1chen avatar joe1chen commented on May 27, 2024 3

+1 Just ran into this bug. Any chance you can cut a new release?

from kaminari-mongoid.

yuki24 avatar yuki24 commented on May 27, 2024

Interesting. It's the most basic feature of Kaminari and I have no idea how this bug slipped in. Would you mind creating an example app that replicates your issue?

Thanks for reporting!

from kaminari-mongoid.

deniciocode avatar deniciocode commented on May 27, 2024

Hey @yuki24,

I created a new rails project and kaminari works here for mongoid.

I have to dig into my Project where I updated the version of kaminari from 0.16.3 to 1.1.1. Maybe I did not configured it right or something is not loaded inside rails.

If I find something when I will show it.

Thank you for your quick response.

from kaminari-mongoid.

deniciocode avatar deniciocode commented on May 27, 2024

Do I need a specific version for mongoid here? Iam using mongoid version 4.0.2

from kaminari-mongoid.

noelrappin avatar noelrappin commented on May 27, 2024

I am having the same error on Mongoid 4.0.2. I am also upgrading from 0.16.3 to 1.1.1.

Our investigation has shown that Kaminari::ConfigurationMethods is mixed in to our classes per the ancestors method, but the method missing error still happens, when we go into a Pry console and run Foo.send(:include, Kaminari::ConfigurationMethods), then the class method works, although the ancestor list has not changed as far as we can tell.

We are on Rails 4.2.10.

from kaminari-mongoid.

noelrappin avatar noelrappin commented on May 27, 2024

kaminari_sample.zip

Here's a sample app that exhibits the behavior. It is a stock Rails 4.2.x that has added Mongoid and Kaminari-Mongoid to the gem file. There is one model, Foo. From my pry session:

> Foo.default_per_page
NoMethodError: undefined method `default_per_page' for Foo:Class

> Foo.ancestors
=> [Foo, Mongoid::Document, Kaminari::Mongoid::MongoidExtension::Document, Kaminari::ConfigurationMethods...]

> Foo.send(:include, Kaminari::ConfigurationMethods)
=> Foo
irb(main):004:0> Foo.default_per_page
=> 25

> Foo.ancestors
=> [Foo, Mongoid::Document, Kaminari::Mongoid::MongoidExtension::Document, Kaminari::ConfigurationMethods...]

The ancestor list doesn't change. Is this some kind of load order issue?

from kaminari-mongoid.

yuki24 avatar yuki24 commented on May 27, 2024

I'm not sure yet but this commit may be it: kaminari/kaminari@4536cc2

from kaminari-mongoid.

yuki24 avatar yuki24 commented on May 27, 2024

confirmed kaminari/kaminari@4536cc2 broke the integration with mongoid 4.0.

from kaminari-mongoid.

yuki24 avatar yuki24 commented on May 27, 2024

This issue has been fixed by kaminari/kaminari@d38c684. We'll cut a new release in a few weeks. Thanks!

from kaminari-mongoid.

rdunlop avatar rdunlop commented on May 27, 2024

Hi @yuki24 did a new release get cut?

from kaminari-mongoid.

yuki24 avatar yuki24 commented on May 27, 2024

@rdunlop No not yet.

from kaminari-mongoid.

nchatu avatar nchatu commented on May 27, 2024

+1 ran into this bug.

mongoid (4.0.2)
kaminari-mongoid (1.0.1)
rails (4.1.1)
ruby (2.2.0)

from kaminari-mongoid.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.