{"issue":{"created_at":"2011-09-27T22:19:13Z","state":"closed","updated_at":"2011-12-11T22:29:54Z","comments":1,"user":{"gravatar_id":"42aade0006ffeb46bbb18430a3986dfa","id":437282,"url":"https://api.github.com/users/briandmcnabb","avatar_url":"https://secure.gravatar.com/avatar/42aade0006ffeb46bbb18430a3986dfa?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"briandmcnabb"},"body":"Hi,\r\n\r\nThis isn't so much a current problem but rather what I see as a potential compatibility issue with other gems.\r\n\r\nThe crux of it is this, if any other gem utilizes the same implementation strategy as kaminari, e.g.:\r\n\r\n```ruby\r\nmodule SomeOtherGem\r\n  module ActiveRecordExtension\r\n    extend ActiveSupport::Concern\r\n    included do\r\n      def self.inherited(kls)\r\n         super\r\n         kls.send(:include, SomeOtherGem::ActiveRecordModelExtension) if kls.superclass == ActiveRecord::Base\r\n     end\r\n  end\r\nend\r\n```\r\n\r\nit will not be able to be used in the same project as kaminari because whichever gem is called later in the gem file will overwrite the **inherited** method of the other.\r\n\r\nWhen I first read the code, I initially assumed that since this was a Module being mixed into ActiveRecord::Base the call to **super** would open up any existing **inherited** method in ActiveRecord::Base and simply add to it.  However after a little digging ( http://bit.ly/qeQw3W ) I realized that my understanding was incorrect since **include** inserts the included module above the class in the inheritance hierarchy.  \r\n\r\nThus you're stuck with the apparent problem of only one gem getting to use the singleton class method **inherited** per project.\r\n\r\nThoughts?","assignee":null,"id":1757117,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":165,"title":"Use of the singleton class method 'inherited'","html_url":"https://github.com/amatsuda/kaminari/issues/165","closed_at":"2011-12-11T22:29:54Z","url":"https://api.github.com/repos/amatsuda/kaminari/issues/165","milestone":null},"action":"closed"}