I'm not sure what's up with the form_tag rendering oddly, but other than that (which is probably a weird interaction between Haml and concatenating Rails helpers) everything seems to be working properly. The reason you're getting the validation errors in the form is that <form> can only contain block-level elements and <fieldset>s, and <input> is an inline element.
Jesse wrote: > Here is a cleaner view: http://pastie.org/288499 (sorry no it's not > actually nested, but a subsequent element.) the source of any page at > http://nutrograph.com shows this form hanging to the left. I don't > understand the validation errors, either. > > On Oct 8, 8:27 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote: > >> I'm surprised that compiles at all... is #nav_search really nested >> beneath "= link_to"? Because that should add an extra "end" that would >> break the whole thing. >> >> Jesse wrote: >> >>> Haml: >>> >>> #nav >>> = link_to image_tag('nutrograph-alpha.png'), root_path >>> #nav_search >>> - form_tag root_path, :method => 'get' do >>> = text_field_tag 'search', params[:search] >>> = submit_tag 'Search Foods', { :name => nil } >>> >>> Source puts <form> tag all the way on the left of the page. And I get >>> a validation error: >>> >>> http://validator.w3.org/check?uri=http%3A%2F%2Fnutrograph.com&charset... >>> >>> 2 errors for the form, and 2 for javascript that are equally >>> puzzling. Please help. >>> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" 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/haml?hl=en -~----------~----~----~----~------~----~------~--~---
