I write a helper method in applicationhelper something like this
str = f.text_field(:username) + "<div class='error'>username is wrong </div>"
then in my view.rhtml it shows like this
<input type="text" value="" size="30" name="user[username]" id="user_username"> <div class="errors">username is wrong</div>
any helps? Thx!