Messages in flash don't clear out on next request

I have a Rails application here that when I display a message to the
user using flash[:notice], flash[:warning], flash[:message], etc. the
message doesn't get cleared out on the subsequent get request. So if I
display a message, then go off to the next page, the message is still
there. On the second request the messages go away. Is there a way to
fix this?

I have a Rails application here that when I display a message to the
user using flash[:notice], flash[:warning], flash[:message], etc. the
message doesn't get cleared out on the subsequent get request. So if I
display a message, then go off to the next page, the message is still
there. On the second request the messages go away. Is there a way to
fix this?

maybe....

   now()

Sets a flash that will not be available to the next action, only to the current.

     flash.now[:message] = "Hello current action"

This method enables you to use the flash as a central messaging system in your app. When you need to pass an object to the next action, you use the standard flash assign ([]=). When you need to pass an object to the current action, you use now, and your object will vanish when the current action is done.

Entries set via now are accessed the same way as standard entries: flash[‘my-key’].