Hi, I was thinking of creating a patch to include two new association callbacks, after_create and before_create. These would work exactly the same way that after_add and before_add would work, but would be called when an item is added to the collection when calling create. Do you think there is any value in this? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2008-Oct-28 10:52 UTC
Re: Association Callbacks: after_create/before_create
On Mon, Oct 27, 2008 at 9:38 PM, jonnii <me@jonnii.com> wrote:> > Hi, > > I was thinking of creating a patch to include two new association > callbacks, after_create and before_create. These would work exactly > the same way that after_add and before_add would work, but would be > called when an item is added to the collection when calling create. > > Do you think there is any value in this?What''s the use case you have in mind? Given that we have after_create and friends on the model themselves, I can''t really think of anything off hand. Perhaps an example would people figure out if they think there''s some value? -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---