Question

I want to be able to get the name of the symbol that was used in a flash message.

For example: I am looking for a function or helper that would return the "warning" when flash[:warning] is active.

Any ideas would be appreciated?

Was it helpful?

Solution

This worked for me. I wanted the string value 'warning' extracted from flash[:warning]

flash.keys.first
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top