Hi all,
I have a web form:
<% form_for @comment do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :author %>
<%= f.text_field :author, :size => 20 %> %>
</p>
<p>
<%= f.label :email %>
<%= f.text_field :email, :size => 20 %>
</p>
<% end %>
When the validation fails, the labels will be wrapped into <div>, so
labels and fields are in different lines, that is not what I want. If
you have the agile web development book, please turn to p.151 (the
source code is in p.146 and [1]), how did the author archived that?
Thanks.
Difei
1.
http://media.pragprog.com/titles/rails2/code/depot_p/app/views/store/checkout.rhtml