Class: Bullet::Notification::UnusedEagerLoading
- Inherits:
-
Base
- Object
- Base
- Bullet::Notification::UnusedEagerLoading
show all
- Defined in:
- lib/bullet/notification/unused_eager_loading.rb
Instance Attribute Summary
Attributes inherited from Base
#associations, #base_class, #notifier, #path, #url
Instance Method Summary
collapse
Methods inherited from Base
#body_with_caller, #eql?, #hash, #notify_inline, #notify_out_of_channel, #short_notice, #whoami
Constructor Details
#initialize(callers, base_class, associations, path = nil) ⇒ UnusedEagerLoading
6
7
8
9
10
|
# File 'lib/bullet/notification/unused_eager_loading.rb', line 6
def initialize(callers, base_class, associations, path = nil)
super(base_class, associations, path)
@callers = callers
end
|
Instance Method Details
#body ⇒ Object
12
13
14
|
# File 'lib/bullet/notification/unused_eager_loading.rb', line 12
def body
"#{klazz_associations_str}\n Remove from your query: #{associations_str}"
end
|
#notification_data ⇒ Object
20
21
22
|
# File 'lib/bullet/notification/unused_eager_loading.rb', line 20
def notification_data
super.merge(backtrace: [])
end
|
#title ⇒ Object
16
17
18
|
# File 'lib/bullet/notification/unused_eager_loading.rb', line 16
def title
"AVOID eager loading #{@path ? "in #{@path}" : 'detected'}"
end
|