Anyone using to_xml and procs...

I'm looking for comments on

In my opinion, the current behaviour is a bug, and should be fixed. If you have a use case where passing procs to the child associations is actually useful, chime in.

Jonathan del Strother

Calling all folks using to_xml with a block -- what do you think?


How about something like this instead (that still prevents the top- level :procs options from being passed on to associations)?

    posts_proc = { |options| options[:builder].tag! ('copyright', 'DHH') }     xml = authors(:david).to_xml(       :indent => 2,       :include => {         :posts => { :procs => [ posts_proc ] }       }     )

See for more details :slight_smile:

Cheers, Chu Yeow