Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Frederick Cheung's latest activity

Friday, May 15 2009
2557 Bug(?) - ActionMailer responds_to? failing to return true/false bug was updated in Ruby on Rails
  • Frederick Cheung
    Frederick Cheung commented at 1:43 PM

    Ah, I'm with you now, it's not actually checking whether foo exists when handling respond_to 'deliver_foo'

Tuesday, May 12 2009
2638 rails/info causes frameworks that are not already loaded to be (partially?) l... was updated in Ruby on Rails
  • Frederick Cheung
    Frederick Cheung commented at 8:00 PM

    Cool, I've been bitten by this one (also with new relic and a databaseless app). Not someone with a checkout of rails handy, but isn't removing the ActiveRecord...

2635 Behavior of child_ids= setter in has_many :through :uniq associations was updated in Ruby on Rails
  • Frederick Cheung
    Frederick Cheung commented at 2:44 PM

    Well I don't thing rails is doing this on purpose - it's basically doing

    
      foos << Foo.find(ids)
    

    and find uniques the ids (ie it's not the association code...

2633 Consistent Integer Values Using Fixtures.identify In Ruby1.9 was updated in Ruby on Rails
  • Frederick Cheung
    Frederick Cheung commented at 9:00 AM

    You will occasionally get duplicate values but that happened with the old hash too and is inevitable (pigeon hole principal etc.)

Monday, May 11 2009
2633 Consistent Integer Values Using Fixtures.identify In Ruby1.9 was updated in Ruby on Rails
  • Frederick Cheung
    Frederick Cheung commented at 10:46 PM

    I'm assuming no-one actually cares what the actual value of Fixture.identify('foo') is, as long as it doesn't change across test runs - I don't think changing t...

  • Frederick Cheung
    Frederick Cheung commented at 6:34 PM

    Part of the problem is that the integer overflows, and according to the c standard an overflowing signed integer has undefined behaviour, so this may be harder ...

  • Frederick Cheung
    Frederick Cheung commented at 4:25 PM

    You're going to get a lot of collisions like that eg

    'foo'.sum == 'oof'.sum

    If we truly need fixture identifiers that persist across runs, i think that taking t...

2610 Module attribute throws NameError on second request (but not first) was updated in Ruby on Rails
  • Frederick Cheung
    Frederick Cheung commented at 4:19 PM

    Well in the brief experiment I did stuff from lib is reloaded between requests (at least by default).

  • Frederick Cheung
    Frederick Cheung commented at 2:24 PM

    In development mode your source is reloaded before every request (but the initializer isn't re-run) so you lose the fact that the value has been set.

2274 named_scope join issue, nil ids was updated in Ruby on Rails
  • Frederick Cheung
    Frederick Cheung commented at 2:39 PM

    been there, done that got the tshirt (there was also a thread on the core list a while back proposing that select => 'foo.*' be the default). find default :sele...