refactored flash messages in _flash_messages partial