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
-- 
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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to