I need to redirect to the previous page once an item is edited but it's redirecting to the same page (edit) again.
I've tried with Redirect::back()
and URL:previous()
. This is the flow:
- (init from one of this two pages) show_pageA or show_pageB
- ->(user clicks edit button) itemcontroller@edit
- ->(clicks save) itemcontroller@store
- ->(store method ends redirecting back) itemcontroller@edit
Instead of being redirected at the steep 4 to itemcontroller@edit I'd like to be redirected to 1. No mather if the page was show_pageA or show_pageB (so I can't do any redirect to specific_page). How can I accomplish this task?