The Spaghetti Refactory Established 2015

Rails' flash vs

I've seen these two things on several projects and never knew the difference. Until now!

 Boiled down to the very basics, use before a render call, and flash before a redirect_to.

  flash persists across an action, so if you use flash for a render, the flash message will show up on the rendered page AND the next page after clicking a link. Conversely, if you run on a redirect_to, you won't even see the message because the doesn't persist across requests. 

Thanks to these resources: