Comments (12)
+1 Just ran into this bug. Any chance you can cut a new release?
from kaminari-mongoid.
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.
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.
Do I need a specific version for mongoid here? Iam using mongoid version 4.0.2
from kaminari-mongoid.
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.
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.
I'm not sure yet but this commit may be it: kaminari/kaminari@4536cc2
from kaminari-mongoid.
confirmed kaminari/kaminari@4536cc2 broke the integration with mongoid 4.0.
from kaminari-mongoid.
This issue has been fixed by kaminari/kaminari@d38c684. We'll cut a new release in a few weeks. Thanks!
from kaminari-mongoid.
Hi @yuki24 did a new release get cut?
from kaminari-mongoid.
@rdunlop No not yet.
from kaminari-mongoid.
+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)
- uninitialized constant Kaminari::Mongoid::VERSION (NameError) HOT 2
- undefined method `paginate' error HOT 2
- Support for without_count? HOT 1
- Incorrect count for paginated results HOT 5
- Bug: undefined method `without_count' for #<Mongoid::Criteria:0x00000000065afa90> HOT 8
- scope override errore when used with sublcasses HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kaminari-mongoid.