In Rails 3.0.5, any subclassed model that is loaded, ever, will produce the following warning in the Rails server log:
Creating scope :page. Overwriting existing method <model_name>.page.
I believe a proper fix here would be to have Kaminari make sure that it has not created the page (and others?) scope before doing so. This way, when a subclass initializes it would not recreate/override the scope that was already defined on the parent class. It's not necessary and it produces this warning message (see: https://rails.lighthouseapp.com/projects/8994/tickets/4083-patch-named-scopes-should-be-allowed-to-overwrite-an-existing-method).
If you'd like to see a sample app where this happens I can upload one to github.
I get the same thing, Rails 3.0.5 and Ruby 1.8.7
Creating scope :page. Overwriting existing method Brush.page.
Creating scope :page. Overwriting existing method Pattern.page.
Creating scope :page. Overwriting existing method Photo.page.
Creating scope :page. Overwriting existing method Texture.page.
All of those are sub-classes to Asset. None of which define paginates_per in their models (actually none of my models do).
Thanks for reporting! (and sorry for not responding this long).
Confirmed this issue, but I still wonder whether Kaminari should just check the existing scopes and skip overwriting, or should do overwrite.
Let me think a little bit more...
Any update on this? It's still an issue. Seems it should realize if it's a subclass...
Any planned progress on this? Still seeing the exact same problem as pdobb initially described. I am on Rails 3.1.1.
I had the same problem, but it seems to be fixed as of 0.13.0.
Yes the 0.13 solved this. This one should be definitely closed.
I'm closing this issue since this is a duplicate of #57.