i have created a custom formbuilder …
class Std_Form_Builder < ActionView::Helpers::FormBuilder
def self.create_field(method_name)
define_method(method_name) do |label, *args|
@template.content_tag(‘div’,
@template.content_tag(‘div’,
@template.content_tag(‘label’, label.to_s.humanize + ‘:’,
:for => “#{@object_name}_#{label}”),
:class => ‘fLabel’) +
@template.content_tag(‘div’, super, :class => ‘fField’),
:class => ‘fRow’)
end
end
field_helpers.each do |name|
create_field(name)
end
end
what i want to achieve is that all the field_helpers get populated with
a default css class. i have no clue … it should still be possible to
override the css class if necessary.
thx for help