From rails/actionpack/test/template/form_helper_test.rb
http://dev.rubyonrails.org/browser/trunk/actionpack/test/template/form_helper_test.rb
starting at line 345
class LabelledFormBuilder < ActionView::Helpers::FormBuilder
(field_helpers - %w(hidden_field)).each do |selector|
src = <<-END_SRC
def #{selector}(field, *args, &proc)
"<label for='\#{field}'>\#{field.to_s.humanize}:</label> " +
super + "<br/>"
end
END_SRC
class_eval src, __FILE__, __LINE__
end
end
On 7/4/06, Peter Michaux <[EMAIL PROTECTED]> wrote:
On 7/4/06, Nicholas Seckar <[EMAIL PROTECTED]> wrote:
> Have you seen the labelling form builder in the test case for form_for?
No I haven't. Do you mean in svn? Does it work like my example?
Thanks,
Peter
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core