Class: RailsBand::ActiveRecord::Event::DeprecatedAssociation
- Defined in:
- lib/rails_band/active_record/event/deprecated_association.rb
Overview
A wrapper for the event that is passed to deprecated_association.active_record.
Instance Attribute Summary
Attributes inherited from BaseEvent
#allocations, #cpu_time, #duration, #end, #idle_time, #name, #time, #transaction_id
Instance Method Summary collapse
-
#backtrace ⇒ Object
:backtraceis only present when the option is enabled;fetchwould raise KeyError in the default configuration. - #location ⇒ Object
- #message ⇒ Object
- #reflection ⇒ Object
Methods inherited from BaseEvent
Constructor Details
This class inherits a constructor from RailsBand::BaseEvent
Instance Method Details
#backtrace ⇒ Object
:backtrace is only present when the option is enabled; fetch would
raise KeyError in the default configuration.
22 23 24 |
# File 'lib/rails_band/active_record/event/deprecated_association.rb', line 22 def backtrace @backtrace ||= @event.payload[:backtrace] end |
#location ⇒ Object
16 17 18 |
# File 'lib/rails_band/active_record/event/deprecated_association.rb', line 16 def location @location ||= @event.payload.fetch(:location) end |
#message ⇒ Object
12 13 14 |
# File 'lib/rails_band/active_record/event/deprecated_association.rb', line 12 def ||= @event.payload.fetch(:message) end |
#reflection ⇒ Object
8 9 10 |
# File 'lib/rails_band/active_record/event/deprecated_association.rb', line 8 def reflection @reflection ||= @event.payload.fetch(:reflection) end |