I’m stumped as to how form_for actually captures the block and puts it
into
the output.
Looking at the method it’s basically
form_for( arg list )
#…
concat( “open tag”, block.binding )
fields_for( stuff, &block )
concat( “close tag”, block.binding )
end
and fields_for is basically a yield of a builder object.
so it boils down to:
concat( “open tag”, block.binding )
yield builder_object
concat( “close tag”, block.binding )
There does not seem to be any binding to the current block in the
builder.
How does the content of the yield get into the output buffer, let alone
get
there in the right place?
Cheers
Daniel