What Changed in Rails v2.3.6 – redirect_to with flash
In this commitgithub.com/rails/rails/commit/e6cadd422b72ba9818cc2f3b22243a6aa754c9f8 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)

