avo icon indicating copy to clipboard operation
avo copied to clipboard

Redirect after submit form

Open Sweex99 opened this issue 3 years ago • 3 comments
trafficstars

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

Sweex99 avatar Jul 01 '22 13:07 Sweex99

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.

adrianthedev avatar Jul 01 '22 13:07 adrianthedev

awesome!

Sweex99 avatar Jul 01 '22 14:07 Sweex99

This issue has been marked as stale because there was no activity for the past 15 days.

github-actions[bot] avatar Jul 17 '22 03:07 github-actions[bot]