module Clear::Model::HasHooks
Direct including types
Defined in:
clear/model/modules/has_hooks.crInstance Method Summary
-
#has_trigger?(event_name : Symbol, direction : Symbol)
Return whether there's at least a trigger connected to this event for this model.
-
#trigger_after_events(event_name)
Triggers the events hooked after
event_name
-
#trigger_before_events(event_name)
Triggers the events hooked before
event_name
-
#with_triggers(event_name, &)
This performs theses operations:
Macro Summary
Instance Method Detail
def has_trigger?(event_name : Symbol, direction : Symbol)
#
Return whether there's at least a trigger connected to this event for this model.
def with_triggers(event_name, &)
#
This performs theses operations:
model.with_triggers("email_sent") do |m|
model.send_email
end
Returns self