Ash FrameworkAF
Ash Framework3y ago
19 replies
Blibs

How does AshAuthentication monitor_fields work?

I was looking into the confirmation addon for AshAuthentication and started wondering what is needed to make monitor_fields work.

For example, I have that field set as monitor_fields: [:email]

What exactly does that do? Does it "automagically" inserts a change on each action that can change the email field?

From my tests, that's not the case, I have an action like this:

    update :change_email do
      alias Actions.ChangeEmail.Changes

      accept [:email]
    end


And nothing happens, an I missing something? Should I add some specific change to that action so these fields start to work?
Was this page helpful?