error in if statement..

think i read somewhere that "puts" should not be used in templates.

use

<%= flash[:message] if flash[:notice].empty? %>