In several of my controllers, I have redirects/flash messages
redirect_to products_url, :notice => "message here",
redirect_to states_url, :error => "oops!" etc...
In my sessions controller, however, upon successful authentication, I have flash[:success] = "welcome!" redirect_to user
I'd like to be able in my other controllers to do something like :success => "yay!"
This is mostly for cosmetic/consistency purposes, but are :notice, :alert and :error the only flash-types available / can I add additional types? Am I making sense?
Thanks!
I believe without changes, this is as close as you'll get:
redirect_to user_path(@user), :flash => { :success => "Message" }
Here's some additional notes regarding the friendly flash syntax addition.