# File lib/nested_form/builder_mixin.rb, line 74 def fields_for_with_nested_attributes(association_name, *args) # TODO Test this better block = args.pop || Proc.new { |fields| @template.render(:partial => "#{association_name.to_s.singularize}_fields", :locals => {:f => fields}) } options = args.dup.extract_options! # Rails 3.0.x if options.empty? && args[0].kind_of?(Array) options = args[0].dup.extract_options! end @fields ||= {} @fields[fields_blueprint_id_for(association_name)] = { :block => block, :options => options } super(association_name, *(args << block)) end