What Changed in Rails v2.3.6 – redirect_to with flash
In this commit rails team improved redirect_to method, we can passing flash option directly.
# ... in an action
#old style
flash[:notice] = "Pay attention to the road"
redirect_to post_url(@post)
#new way
redirect_to post_url(@post), :notice => "Pay attention to the road"
#old style
flash[:notice] = "Pay attention to the road"
redirect_to post_url(@post)
#new way
redirect_to post_url(@post), :notice => "Pay attention to the road"
alert,alert=(message),notice,notice=(message)

