To add to this, the documentation does not mention that a class will automatically be appended. This is something that i personally patched a while back and i see that it has resurfaced again. Is there a reason why merb forces a class attribute?
Michael On Wed, Feb 4, 2009 at 3:07 PM, Jacques Crocker <[email protected]> wrote: > > I fixed the label issue (for attr missing) a little while back (via > 1.0.6) on bound form elements, but I may have broke it for unbound > form elements. > > Anyways, here are some form helper spec updates that repro the issue > > http://github.com/merbjedi/merb/commit/19c2e92706b3ab927d420b3498217964426b9407 > > If you don't get around to it, I should be able to provide a patch for > this issue tonight. Be another good one to get fixed for 1.0.9 > > Thanks > > > On Feb 4, 11:45 am, Yehuda Katz <[email protected]> wrote: > > I saw this as well in an app I'm working on. There appears to have been a > > regression with for=. I need to fix this for my own app :) > > > > -- Yehuda > > > > > > > > On Wed, Feb 4, 2009 at 11:43 AM, Shalon Wood <[email protected]> wrote: > > > > > No difference. > > > > > <p><%= text_field :name => 'title', :label => "Title" %></p> > > > > > produces > > > > > <p><label>Title</label><input type="text" class="text" > name="title"></p> > > > > > (And the example in the documentation is > > > <%= text_field :name => :fav_color, :label => "Your Favorite Color" %> > > > # => <label for="fav_color">Your Favorite Color</label><input > type="text" > > > id="fav_color" name="fav_color" /> > > > ) > > > > > Shalon Wood > > > > > Tony Mann <[email protected]> writes: > > > > > > You might want to try making :name a string, and a not a symbol. > > > > > > ..tony.. > > > > On Wed, Feb 4, 2009 at 11:30 AM, Shalon Wood <[email protected]> > wrote: > > > > > > According to the documentation for #text_field, this: > > > > <%= text_field :name => :title, :label => "Title" %> > > > > should generate > > > > <label for="title">Title</label><input type="text" id="title" > > > > name="title"> > > > > However, what I'm seeing is this: > > > > <p><%= text_field :name => :title, :label => "Title" %></p> > > > > <p><%= text_field :name => :short_title, :label => "Short title" > > > > %></p> > > > > <p><%= text_field :name => :file_prefix, :label => "File prefix" > > > > %></p> > > > > <p><%= text_field :name => :keywords, :label => "Keywords" > %></p> > > > > <p><%= text_area :name => :on_release, :rows => 5, :label => > > > > "Scripts to > > > > run on release" %></p> > > > > <p><%= select :name => :universe_id, :label => "Universe", > > > > :collection > > > > => @authinfo[:user].universes, :text_method => :name, > :value_method > > > > => > > > > :id %> > > > > <p><%= text_area :name => :description, :label => "Description" > > > > %></p> > > > > <%= hidden_field :name => :flag %> > > > > yields: > > > > <p><label>Title</label><input type="text" class="text" > > > > name="title"></p> > > > > <p><label>Short title</label><input type="text" class="text" > > > > name="short_title"></p> > > > > <p><label>File prefix</label><input type="text" class="text" > > > > name="file_prefix"></p> > > > > <p><label>Keywords</label><input type="text" class="text" > > > > name="keywords"></p> > > > > <p><textarea label="Scripts to run on release" rows="5" > > > > name="on_release"></textarea></p> > > > > <p><label>Universe</label><select > name="universe_id"></select></p> > > > > <p><textarea label="Description" > name="description"></textarea></p> > > > > <input type="hidden" class="hidden" name="flag"> > > > > Anyone know why? > > > > Shalon Wood > > > > -- > > > > > -- > > > > -- > > Yehuda Katz > > Developer | Engine Yard > > (ph) 718.877.1325 > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" 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/merb?hl=en -~----------~----~----~----~------~----~------~--~---
