lib/cased/model.rb
# Instruments events for the model. These events are sent directly to Cased.
#
# @param action [String, Symbol] suffix of the action.
# @param category [String, Symbol] action category name.
# @param payload [Hash] additional payload information about the event.
#
# @return [Array] of responses from Cased.publishers
Instruments events for the model. These events are sent directly to Cased.
Instruments events for the model . These events are sent directly to Cased .
def cased(action, category: cased_category, payload: {})
      body = cased_payload.deep_merge(payload)
      Cased.publish(body.merge(action: "#{category}.#{action}"))
    end
def cased ( action , category : cased_category , payload : { } ) body = cased_payload . deep_merge ( payload ) Cased . publish ( body . merge ( action : "#{category}.#{action}" ) ) end
Instruments events for the model.
Instruments events for the model .
of responses from Cased.publishers
of responses from Cased . publishers
Array
action
suffix of the action.
suffix of the action .
category
action category name.
action category name .
cased_category
payload
additional payload information about the event.
additional payload information about the event .