def action_hook?(self_only = false)
      @action_hook_defined || !self_only && owner_class.state_machines.any? { |name, machine| machine.action == action && machine != self && machine.action_hook?(true) }
    end
def action_hook?(self_only = false)
      @action_hook_defined || !self_only && owner_class.state_machines.any? { |name, machine| machine.action == action && machine != self && machine.action_hook?(true) }
    end
Determines whether an action hook was defined for firing attribute-based
 event transitions when the configured action gets called.