On 7/4/06, Peter Michaux <[EMAIL PROTECTED]
> wrote:
Hi,
I found a plugin on the web for a label helper and modified it to be
more like the rails core form elements behave (errors etc). I really
think this could be good to DRY forms especially with the new CRUD for
everything and likely more reliance on scaffolding. In my _form.rhtml
partial I can now write (abreviated)
<% form_for :category, @category,
:url ="" {:action="" |f| %>
<%= f.label :name %></dt>
<%= f.text_field :name %></dd>
<%= f.label :description, 'The description' %></dt>
<%= f.text_area :description %></dd>
<% end %>
I'm not a rails wizard and don't feel like I could make a quality
patch. Can someone help or tell me what's wrong with my plugin?
View the plugin code online
http://dev.actioncommerce.org/trac/browser/trunk/vendor/plugins/label_helpers/lib/label_helper.rb
Checkout the plugin
svn checkout http://www.actioncommerce.org/svn/actioncommerce/trunk/vendor/plugins/label_helpers
Thanks,
Peter
The plugin I found doesn't work with form_for and doesn't behave like
the other rails form_helpers. It appends an error string instead of
wrapping the element. I don't think that is as flexible
http://www.eric-stewart.com/svn/rails/plugins/label_helpers/lib/label_helper.rb
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core