Form Helpers — Ruby on Rails Guides: "class LabellingFormBuilder < ActionView::Helpers::FormBuilder
def text_field(attribute, options={})
label(attribute) + super
end
end
If you reuse this frequently you could define a labeled_form_for helper that automatically applies the builder: LabellingFormBuilder option."
'via Blog this'
No comments:
Post a Comment