Sha256: 688d8a62cb44d360c639310ece1449ec763cb6c06e933151aa8ca869aa0cd77f

Contents?: true

Size: 659 Bytes

Versions: 1

Compression:

Stored size: 659 Bytes

Contents

module Bullet
  module Notification
    class UnusedEagerLoading < Base
      def initialize(callers, base_class, associations, path = nil)
        super(base_class, associations, path)

        @callers = callers
      end

      def body
        "#{klazz_associations_str}\n  Remove from your finder: #{associations_str}"
      end

      def title
        "AVOID eager loading #{@path ? "in #{@path}" : 'detected'}"
      end

      def notification_data
        super.merge(
            :backtrace => []
        )
      end

      protected

        def call_stack_messages
          (['Call stack'] + @callers).join("\n  ")
        end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bullet-5.7.0 lib/bullet/notification/unused_eager_loading.rb