Pergunta

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?

Foi útil?

Solução

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

flash.keys.first
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top