I'm following a couple of guides on nested forms and am getting stuck
building a helper. My helper code (simplified) is below. It doesn't
work, I can't seem to get the fields_for helper to export anything but
erb. Can anyone help me with how to do this properly?

Thanks!!


def new_child_fields_template
    fields = form_builder.fields_for(association,
options[:object], :child_index => "new_#{association}") do |f|
      render(:partial => options[:partial], :locals =>
{options[:form_builder_local] => f})
    end

    haml_tag(:div, :id => "#{association}_fields_template", :class =>
"") do
      fields
    end
end

The guides I'm following:
- 
http://openmonkey.com/articles/2009/10/complex-nested-forms-with-rails-unobtrusive-jquery
- http://railscasts.com/episodes/197-nested-model-form-part-2

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to