I notice that this happens wherever the action of the form is the same route as
show
page.
I found this problem when I want to redirect to index
page after a successful create
.
And this only happens when I use Firefox, but not in Chrome.
Adding created
status will make the redirection work for me:
redirect_to posts_path, status: :created
But for update
, i just add a random param to the path to make the url different , for example:
redirect_to post_path(@post, redirecting: true)