avo
avo copied to clipboard
Redirect after submit form
Context
Hi! after_create_path and after_update_path are control what will happened after submit form. Can i customise options to redirect, not only :show and :index, for example: self.after_create_path = root_path ? (Perhaps with the ability to change the text of the flash message)
System configuration
Avo version: 2.9.1
Rails version: 7.0.1
Ruby version: 3.2.1
License type (Community or Pro): Community
That's not a bad idea!
Maybe there's a place for this in the controllers Avo generates for you. Some callbacks like redirect_on_success or respond_on_success (probably with better naming).
There's a PR open with something similar https://github.com/avo-hq/avo/pull/993.
I'll write a few more ideas about this so we can ship a complete feature .
I'll add this to the "next-up" list on the roadmap.
awesome!
This issue has been marked as stale because there was no activity for the past 15 days.