added test for after submission with and without valid info & use content_tag() to clean the code for flash