smpallen99/coherence

redirect after user model update?

ringofhealth opened this issue · 0 comments

the default action after a user updates any field goes to /registration show page. Which is pretty inflexible. I tried to add password_update override in redirect.ex to catch when a user update the password and send them somewhere else.

This currently doesn't work. it always return /registrations after an update.

def password_update(conn, _) do
   redirect(conn, to: dashboard_path(conn, :index))
end

Edit:
After looking at the source code, redirect.ex file has a callback function named registration_update/3, that can be overriden to do custom stuff. This was no in the documentation. Maybe it can be added?

This can be closed now.