Eventful.Trigger (eventful v3.0.1)

Handles the triggering of events

You can define a trigger in the following way

defmodule MyApp.Post.Triggers do
  use Eventful.Trigger

  alias MyApp.Post

  Post
  |> trigger([currently: "published"], fn event, post ->
    # add your code here.
  end)
end

Link to this section Summary

Functions

The trigger macro function allows you to define a trigger in your trigger module

Link to this section Functions

Link to this macro

trigger(module, options, fun)

(macro)

The trigger macro function allows you to define a trigger in your trigger module

Post
|> trigger([currently: "published"], fn event, post ->
  # add your code here.
end)