add the flash method in application helper file. remove the cookies field form question model. after creating topic page redirect to the index page.