Still getting - NameError: undefined method 'render_partial_with_logging' for class 'ActionView::LogSubscriber'

/vendor/bundle/ruby/2.0.0/gems/kaminari-0.14.1/lib/kaminari/helpers/paginator.rb:89 in "alias_method"
/vendor/bundle/ruby/2.0.0/gems/kaminari-0.14.1/lib/kaminari/helpers/paginator.rb:89 in "singleton class"
/vendor/bundle/ruby/2.0.0/gems/kaminari-0.14.1/lib/kaminari/helpers/paginator.rb:88 in "to_s"
/vendor/bundle/ruby/2.0.0/gems/kaminari-0.14.1/lib/kaminari/helpers/action_view_extension.rb:19 in "paginate"

Refactored the to_s method.

Is there any reason why the part that sets the singleton class on the subscriber cannot be moved to the initialize method (I tried this - seemed to work, but I decided not to change too much)?

I tried to cater for the case where there may be multiple LogSubscribers and subclasses of ActionView::LogSubscriber

I also used Thread.current to convey the "render_without_logging" intent and ensure to reinstate logging.

To test this patch I switched between the gem and our github fork in our Gemfile - gem raises the exception and fork does not.

I could not run the specs, sorry.

rails (3.2.12)
mongoid (3.1.5)