If you're returning RJS or the like from the AJAX call, the method I'd use would be to wrap the error_messages_for in a div and send back a page.replace call that fills it out. I've used this in a couple production apps without problems.
--Matt Jones On Aug 29, 4:51 am, bgumbiker <[email protected]> wrote: > Hello, > Does anyone know how to use error_messages_for with remote_form_for? > > Here is my code: > > <%= error_messages_for 'quotation' %> > > <div id="quotation_form"> > <% remote_form_for(Quotation.new, :url => { :action => > "send_quotation" }) do |f| %> > .... > .... > .... > <% end %> > > The <%= error_messages_for 'quotation' %> is always replaced by empty > space in html as 'quotation' at that time is nil. > > Any idea how to make it work without setting 'quotation' variable in > the controller? > > thanks, > bogumbiker --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

