In my account controller I\'d like to display (render, redirect_to ?) the edit view after changes get saved and display flash notice.
def update
@account =
If you just use flash[:notice]
that value will still be available in the next request. Meaning, you'll see the text on the next 2 pages. Instead use flash.now
to only make the value available in the current request.
format.html {
flash.now[:notice] = 'message'
render :edit
}
For reference read Action Controller Overview 5.2.1