문제

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