私のイベントは次のように定義されています。
event :share, after: :inc_in_path_share do
transitions from: :bucketed, to: :shared
error do |e|
inc_share(message, tags)
end
end
と私は呼んでいmy_instance.share(message, tags)ます。トランジションが許可されていれば、 andで呼び出すinc_in_path_shareのに問題はありません。しかし、トランジションが許可されていない場合、ブロック内でデフォルトのアクションを処理したいと考えています。messagetagsinc_shareerror
メッセージとタグをerrorブロックに渡す方法は? 私が考えている方法も最善ではないかもしれません(XY問題)。ありがとう !