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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On 11/20/07, Jon <jdelStrother@gmail.com> wrote:> 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.Calling all folks using to_xml with a block -- what do you think? jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
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
On Nov 21, 7:25 am, "Jeremy Kemper" <jer...@bitsweat.net>
wrote:> On 11/20/07, Jon <jdelStrot...@gmail.com> wrote:
>
> > I''m looking for comments
onhttp://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.
>
> Calling all folks using to_xml with a block -- what do you think?
>
> jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---