Hi,
I want to add a form helper in a content_tag like this:
def custom_field(form, attribute_name, form_helper, message = "") error = form.object.errors.get(attribute_name).present? klasses = ["clearfix"] klasses << "error" if error
content_tag :div, :class => klasses.join(", ") do form.label :attribute_name content_tag(:div, :class => :input) do form.send(form_helper, attribute_name, :class => (error ? "error" : nil)) content_tag :span, :class => "help-inline" do form.object.errors.get(attribute_name) end end end end
This works but the form helper aren't rendered. What do I have to do to render the form helpers??
Gregory