On Fri, Oct 24, 2008 at 2:15 PM, Ken Miller <[EMAIL PROTECTED]> wrote: > On Oct 24, 12:38 pm, "Michael Koziarski" <[EMAIL PROTECTED]> > wrote: >> On Fri, Oct 24, 2008 at 6:32 PM, Ken Miller <[EMAIL PROTECTED]> wrote: >> >> > when you use a find_or_create_ automatic method with an initializer >> > block, the block isn't called on the first run, but is called on >> > subsequent runs:
Is this really the desired behavior? I've always considered that block equivalent to the AR::Base initializer: Foo.new do |f| f.thing = default_value end If that's the case, I feel like it *should* be ignored when find_or_create_by_n returns a preexisting record. ~ j. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
