app/models/event_context.rb
# Stop sending events in the current context for the duration of a block
# (useful for situations where records are updated programatically, e.g. in background jobs,
# and we don't want to send events)
Stop sending events in the current context for the duration of a block
(useful for situations where records are updated programatically, e.g. in background jobs,
and we don't want to send events)
Stop sending events in the current context for the duration of a block ( useful for situations where records are updated programatically e . g . in background jobs and we don ' t want to send events )
def suppress_events
    self.events_suppressed = true
    yield
    self.events_suppressed = false
  end
def suppress_events self . events_suppressed = true yield self . events_suppressed = false end
Stop sending events in the current context for the duration of a block
(useful for situations where records are updated programatically, e.g.
Stop sending events in the current context for the duration of a block ( useful for situations where records are updated programatically e . g .