    # File lib/action_view/helpers/form_helper.rb, line 299
          def fields_for(record_or_name_or_array, *args, &block)
            raise ArgumentError, "Missing block" unless block_given?
            options = args.extract_options!

            case record_or_name_or_array
            when String, Symbol
              object_name = record_or_name_or_array
              object = args.first
            else
              object = record_or_name_or_array
              object_name = ActionController::RecordIdentifier.singular_class_name(object)
            end

            builder = options[:builder] || ActionView::Base.default_form_builder
            yield builder.new(object_name, object, self, options, block)
          end