Ability to customize what happens after record is created/edited. #776
Closed
MrJoy
started this conversation in
Feature requests
Replies: 1 comment 4 replies
-
Hi, That's not such a bad idea. I'm thinking about adding the following methods # redirect the user to the index page
self.after_save_path = :index
# redirect to show (default)
self.after_save_path = :show Do you think that would be enough? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In some workflows, it makes more sense to redirect the user to, say, the index view after creating/editing a record than to send the user to the show view. Having the ability to gracefully customize this behavior would be quite helpful.
I've reviewed the Avo code and it looks like changing this behavior right now would basically involve copy-pasting the
create
method into my resource class, and changing it there. That's certainly a feasible short-term workaround but I'm concerned about drift, as the upstream code evolves.Beta Was this translation helpful? Give feedback.
All reactions