AshEvents.Events

View Source

Defines the events section for a resource.

events

Examples

events do
  event_log MyApp.Events.EventLog
  ignore_actions [:create_old_v1, :update_old_v1, :update_old_v2, :destroy_old_v1]
  current_action_versions create: 2, update: 3, destroy: 2
end

Options

NameTypeDefaultDocs
event_logmoduleThe event-log resource that creates and stores events.
ignore_actionslist(atom)[]A list of actions that should not have events created when run.
current_action_versionskeyword[]A keyword list of action versions. This will be used to set the version in the created events when the actions are run. Version will default to 1 for all actions that are not listed here.