I suspect this has been asked 400 times, but Google yields 2-3 rather
complex gymnastics in blogs (and possibly dated), and searching list
archives on ruby-forum proves kinda useless.
Using standard forms, it's fairly easy to use
@object.errors[:field_name] in the form to embed an error message right
next to the field that has the invalid entry. The controller uses a
simple conditional with redirect_to to re-display the form if needed.
I don't understand how to reproduce this same straight-forward process
when the form uses a form_remote_tag.
Is there a simple, universal process for this, or does it really take 40
lbs of hacks to accomplish like the blogs all seem to suggest?
It should be reasonably straightforward to re-render the entire form.
It might get more complicated if you want to be cleverer that that. I
suppose you could have a div/span with a predictable id next to each
field then loop over object.errors, inserting relevant content into
each of these div/spans