I know this is an old post, but I wanted to add an answer for those stumbling across it. The problem is you are redirecting after setting the flash. This makes a new request, in effect erasing any values you’ve set.
To get the flash message to appear you must render the page and your view must have code to display the user’s flashes.