abstract flash messages into partial