You will need to move to a partial called _message all the content for a single message. ALSO, PLEASE MAKE USE OF CLEARER VARIABLES, although msg it's a common contraction for message, please use message as the variable name