[newbie] Question about form_remote_tag

Howdy,

I have a form that is defined with “form_remote_tag(:update =>
“my_status”, :url => { :action => :responder, :id => @event.id } )”,
that uses a model with call to validates_presence_of.

The problem is, I can’t seem to figure out how to update the screen
after an @object.save fails, because of values missing (i.e.
validates_presence_of).

The call back to “my_status”, which is a DIV, seems to work just fine:
render_text “Saved okay”. I guess I’m just missing the method to show
errors from a controller.

Note: I know in the view, you would have “<%= error_messages_for
‘object’ %>”. This never gets updated in the AJAX style call…

Thanks for any help. :slight_smile:

–Kevin

Nevermind, I figured it out:

Stub in a view file that matched my action (by name), and include <%=
error_messages_for ‘event’ %>.

This is then rendered back in my render_text call.

Simple enough… :slight_smile: