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.

Lars Klevan's latest activity

Wednesday, September 09 2009
3175 named_scope.is_a? loads association was created in Ruby on Rails
  • Lars Klevan
    Lars Klevan created the ticket at 4:14 PM

    I've run into this issue twice where I have different behavior when I'm dealing with an Array versus a named scope and checking is_a? is unexpectedly loading a ...

Monday, September 15 2008
749 Optimize named_scope first and last to use LIMIT rather than loading the full... was updated in Ruby on Rails
  • Lars Klevan
    Lars Klevan commented at 11:24 PM

    Updated the docs for ActiveRecord#first and #last. Example for #first below.

    A convenience wrapper for find(:first, *args). You can pass in all the

    same argumen...

Saturday, August 02 2008
749 Optimize named_scope first and last to use LIMIT rather than loading the full... was created in Ruby on Rails
  • Lars Klevan
    Lars Klevan created the ticket at 7:02 PM

    I wanted to use Account.recent.first(5) to display the most recent 5 accounts in the system. I noticed that this was loading the whole table into memory rathe...