Hi Victor, On Feb 11, 2011, at 12:50 PM, Victor Stan wrote:
> I have this haml: > > %p > = link_to "New Location Item", new_location_item_path > = form_tag location_items_path, :method => "get" do > = select_tag :location_id, > options_for_select(@location_parents.unshift(['All locations', 0]), > params[:location_id]), :onchange => "this.form.submit();" > > so i expect something like: > > <p> > <a href... > <form... > <select... > </form> > </p> > > but instead I get > > <p> > <a href... > </p> > <form... > <select... > </form> > <p></p> > > you can see the screenshot i attached... It looks like you're looking at the output of a tool like Firebug or Webkit's developer tools. That shows how the browser interpreted the HTML, not how it was generated. Look at the browser's view source option to see the actual HTML being produced by Haml. You'll see that the <form> is inside the <p>. In this case, the browser is closing the p tag because p cannot contain other block-level tags. Rhett > > > > -- > 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. -- 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.
