class Bullet::Notification::NPlusOneQuery

Attributes

counter[RW]

Public Class Methods

new(callers, base_class, associations, path = nil) click to toggle source
Calls superclass method
# File lib/bullet-board/ext/notification.rb, line 29
def initialize callers, base_class, associations, path = nil
  super base_class, associations, path

  @callers = callers
  @counter = 0
end

Public Instance Methods

notification_data() click to toggle source
Calls superclass method
# File lib/bullet-board/ext/notification.rb, line 36
def notification_data
  if self.notifier == UniformNotifier::CustomizedLogger
    self.counter += 1
    puts "Call NPlusOneQuery count: #{self.counter}"
  end

  super
end