Rails page caching and flash messages
- by KJF
I'm pretty sure I can page cache the vast majority of my site but the one thing preventing me from doing so is that my flash messages will not show, or they'll show at the wrong time.
One thing I'm considering is writing the flash message to a cookie, reading it and displaying it via javascript and clearing the cookie once the message has been displayed.
Has anyone had any success doing this or are there better methods?
Thanks.