Вопрос

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?

Это было полезно?

Решение

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

flash.keys.first
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top