Jon1
(Jon)
November 20, 2007, 5:38pm
1
I'm looking for comments on http://dev.rubyonrails.org/ticket/10162
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
bitsweat
(Jeremy Daer)
November 20, 2007, 11:25pm
2
Calling all folks using to_xml with a block -- what do you think?
jeremy
How about something like this instead (that still prevents the top-
level :procs options from being passed on to associations)?
posts_proc = Proc.new { |options| options[:builder].tag!
('copyright', 'DHH') }
xml = authors(:david).to_xml(
:indent => 2,
:include => {
:posts => { :procs => [ posts_proc ] }
}
)
See http://dev.rubyonrails.org/ticket/10162#comment:3 for more
details
Cheers,
Chu Yeow