What you need is a custom form buider -> http://onrails.org/articles/2008/06/13/advanced-rails-studio-custom-form-builder
- Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Tue, Feb 10, 2009 at 8:08 AM, atmorell <atmor...@gmail.com> wrote: > > Hello, > > I would like to wrap the class type-text around each label/text_field. > There must be a better way than my example below? I don't know how to > do this without an object to loob through :) > > <% content_tag :div, :class => "type-text" do -%> > <%= label(:user, :login, "Username") %><%= f.text_field :login %> > <% end %> > > <% content_tag :div, :class => "type-text" do -%> > <%= label(:user, :firstname, "Firstname") %><%= > f.text_field :firstname %> > <% end %> > > <% content_tag :div, :class => "type-text" do -%> > <%= label(:user, :lastname, "Lastname") %><%= f.text_field :lastname > %> > <% end %> > > Best regards. > Asbjørn Morell. > > > --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---