Skip to content

ActiveRecord::Base subclasses that are defined before Kaminari is loaded now get the proper mixins #119

merged 1 commit into from Aug 21, 2011

4 participants


We have a gem that provides an ActiveRecord::Base subclass. However, since it is loaded by Bundler before the self.included hook is mixed into to ActiveRecord::Base, it never gets the "page" scope.

With our fix, mixing in the module will back-fill existing subclasses with the scope.

Grant Hutchins & Sam Obukwelu Active Record models that were subclassed before Kaminari::ActiveReco…
…rdExtension is included pick up the extensions.
pupeno commented May 27, 2011

I also had the problem of not having pagination of these model, in my case it was the Audit model. I switched to Casecommons's repo and it worked :)

2-718 commented May 31, 2011

I'm using the acts_as_audited gem v2.0.0.rc7 and the Audit class would not paginate until I switched to Casecommon's kaminari v0.12.4 repo. This works for me now.

@amatsuda amatsuda merged commit 6998b5f into amatsuda:master Aug 21, 2011
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.