Sha256: 2dca9d17480d89b24ac14e1542f925e374c042c5aaba063d85140a1d230eb59f
Contents?: true
Size: 623 Bytes
Versions: 6
Compression:
Stored size: 623 Bytes
Contents
# frozen_string_literal: true require 'action_view/log_subscriber' require 'action_view/context' require 'kaminari/helpers/paginator' module Kaminari # = Helpers module ActionViewExtension # Monkey-patching AV::LogSubscriber not to log each render_partial module LogSubscriberSilencer def render_partial(*) super unless Thread.current[:kaminari_rendering] end end end end # so that this instance can actually "render" ::Kaminari::Helpers::Paginator.send :include, ::ActionView::Context ActionView::LogSubscriber.send :prepend, Kaminari::ActionViewExtension::LogSubscriberSilencer
Version data entries
6 entries across 6 versions & 3 rubygems