Mukund wrote: > form_for results in a POST operation. You are checking for > request.xhr? in your controller to render the partial. Use > remote_form_for instead to get a XHR request. > > Pressing an enter key in a text field doesn't submit a form. The tags > don't add that in. > > Regards, > Mukund > >
I changed the form_for to remote_form_for, and this disabled the search for the new view - Thanks. Using firebug I still see it's getting a 404 error when I hit enter in the text field. so I'm not sure what's submitting the form on enter.. Also, I'm afraid I'm not sure what you mean with the XHR part - should I just change render :partial => 'person' if request.xml_http_request? to render :partial => 'person' now that remote_form_for submits an ajax request? Thanks for your help! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---