Hi, I have a customer add form in which i call form_remote_tag to update a customer list within another div on my page. I need to also, however, allow for proper error checking, and the issue is that the form_remote_tag will only update a single div tag. I have seen a few ways to deal with this, but I want to know what the best way is, while still allowing the model to do all of the verification. Thanks, Ryan Lundie -- Posted via http://www.ruby-forum.com/.
Ryan Lundie wrote:> Hi, > > I have a customer add form in which i call form_remote_tag to update a > customer list within another div on my page. > > I need to also, however, allow for proper error checking, and the issue > is that the form_remote_tag will only update a single div tag. > > I have seen a few ways to deal with this, but I want to know what the > best way is, while still allowing the model to do all of the > verification. > > Thanks, > Ryan LundieI have NO idea how to do it... :( Someone help us ( I work with Ryan ) -- Posted via http://www.ruby-forum.com/.
with rjs you can solve this if @object.save normal_routine else page.replace_html ''error_div'', content_tag( ''div'', error_message_on( ''model'', ''field'' ), ''class'' => ''error_text'' ) end hope that helps -- Posted via http://www.ruby-forum.com/.