Do some tail'ing on your logs and see if you're being redirected to multiple actions before you render. If you are, it's likely that flash isn't being kept long enough to make it to the view where it is finally rendered.
A well-placed flash.keep(:notice)
should do the trick.
Much later edit: Also, in retrospect, if you're redirecting that many times, I highly suggest you do some refactoring and eliminate any unnecessary jumps by consolidating your redirect logic at a higher level, so that your redirects are predetermined and only happen once, twice max.
simple, but effective:
modify ApplicationController < ActionController::Base as follows:
alias :std_redirect_to :redirect_to
def redirect_to(*args)
flash.keep
std_redirect_to *args
end
Best approach is to write these line in views/layouts/application.html.erb file
<%= notice %>
<%= alert %>
and write
layout 'application'
in controllers
IN your controller use:
redirect_to signin_path, :notice => "There is already an acount for this email. Please Login to create your board."
In your application layout use:
<%= notice %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With