Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect after user model update? #412

Open
ringofhealth opened this issue Jan 17, 2019 · 0 comments
Open

redirect after user model update? #412

ringofhealth opened this issue Jan 17, 2019 · 0 comments

Comments

@ringofhealth
Copy link

ringofhealth commented Jan 17, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant