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.

darkhelmetlive's latest activity

Monday, May 17 2010
4502 Using a where clause on a different table in a scope with a lambda overwrites... was updated in Ruby on Rails
  • darkhelmetlive
    darkhelmetlive commented at 8:29 PM

    I tried to write a test case to replicate it, but it worked as it's supposed to. I'm either doing something wrong, or it was broken in beta3 and I didn't proper...

Wednesday, May 12 2010
4502 Using a where clause on a different table in a scope with a lambda overwrites... was updated in Ruby on Rails
Thursday, April 29 2010
4502 Using a where clause on a different table in a scope with a lambda overwrites... was created in Ruby on Rails
  • darkhelmetlive
    darkhelmetlive created the ticket at 10:38 PM

    If I make a scope like this:

    scope(:id_or_name, lambda { |f, v|
      where(f => v.match(/^\d+$/) ? { :id => v } : { :name => v })
    })
    

    and then use it like this:

    ...