AshEvents.Events
View SourceDefines 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
Name | Type | Default | Docs |
---|---|---|---|
event_log | module | The event-log resource that creates and stores events. | |
ignore_actions | list(atom) | [] | A list of actions that should not have events created when run. |
current_action_versions | keyword | [] | 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. |