amatsuda/kaminari — pull request #262 by rindek (2012-07-18 14:04:39+00:00)
Title: Subclasses are including ActiveRecordModelExtension too fast

Hi,

In regard of this issue: https://github.com/amatsuda/kaminari/pull/119
Everything works fine, unless you want to change the configuration of Kaminari (for example change the page_method_name)

I'm using paper_trail in project, but I'm also kind of forced to change the page_method_name.
First paper_trail is loaded, then kaminari after ActiveSupport loads, then all 'subclasses' are having ActiveRecordModelExtension included, right with Version model which is provided by paper_trail, but unfortunately the extensions are loaded before the configuration file from project is loaded, therefore, Version model has default kaminari config, while other projects model have proper config.

I've changed active_record_extension to load subclasses when first model is 'loaded' in project.