# Ajax on failure message

**URL:** <https://www.ruby-forum.com/t/ajax-on-failure-message/153324>\
**Category:** Rails\
**Created:** [November 14, 2008, 9:34pm UTC](https://www.ruby-forum.com/t/ajax-on-failure-message/153324 "2008-11-14T21:34:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyanlion](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f0a364/32.png) [@tyanlion](https://www.ruby-forum.com/u/tyanlion)\
**Post date:** [November 14, 2008, 9:34pm UTC](https://www.ruby-forum.com/t/ajax-on-failure-message/153324/1 "2008-11-14T21:34:16Z")

</div>

How do i change the ajax failure message

\<% remote\_form\_for(:comment, :url =\> grocery\_comments\_path(params  
[:id]),  
:html =\> { :id =\> ‘new\_comment\_form’ }, :method =\> :post, :update =\>  
{ :failure =\> “error” }) do |form| %\>

the :update =\> { :failure =\> “error” }

gives me the usual error messages inside the

 

How do i change this error message to a string?
