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.

Chris Hapgood's latest activity

Monday, September 13 2010
5060 ActiveRelation "offset().empty?" produces unexpected result was updated in Ruby on Rails
  • Chris Hapgood
    • Tag changed from activerecord to activerecord, scope
    by Chris Hapgood at 8:40 PM
  • Chris Hapgood
    Chris Hapgood commented at 8:39 PM

    For what it's worth, I've been following/fighting this issue for a while and I agree with Wincent: the OFFSET clause needs to be conditionally stripped from sco...

Thursday, June 03 2010
1652 named_scope incorrectly uses SQL COUNT for empty?, size methods when :select ... was updated in Ruby on Rails
  • Chris Hapgood
    Chris Hapgood commented at 7:50 PM

    Regarding the wisdom of having named scopes manage counting SQL independently...

    Imagine a scope that handles pagination via :limit and :offset options

    Shirts.r...

Friday, January 15 2010
3693 [PATCH] ActiveRecord timestamp conversions fail for some cases was updated in Ruby on Rails
  • Chris Hapgood
    Chris Hapgood commented at 11:53 PM

    I spent an entirely inappropriate amount of time digging into this issue...

    Here are some observations:

    The #microseconds method LOOKS clumsy, but it's actually...

Tuesday, January 05 2010
3645 Let label helpers accept blocks was updated in Ruby on Rails
  • Chris Hapgood
    Chris Hapgood commented at 1:36 PM

    Double bonus for this enhancement -thanks Stephen. I see that you have also made the "name" attribute optional -fantastic. Now one can implicitly apply a label ...

Saturday, November 07 2009
3147 ActiveRecord::Error#full_message broken when used with I18n and autosave asso... was updated in Ruby on Rails
  • Chris Hapgood
    Chris Hapgood commented at 8:49 PM

    This commit (f5f7c40f3aedf88b2aef4e83602a4f41ffa5d0ab) introduces a new limitation for ActiveRecord::Base instances that has (to my knowledge) never been discus...

Friday, November 06 2009
3467 ActionView::TestCase dies when rendering a layout was updated in Ruby on Rails
  • Chris Hapgood
    Chris Hapgood commented at 10:42 PM

    If you're looking at the patch for this ticket, consider this ticket as well (it's simple and pertains to the same test file): https://rails.lighthouseapp.com/...

  • Chris Hapgood
    Chris Hapgood created the ticket at 10:18 PM

    ActionView::TestCase creates a view with a nil output buffer -probably assuming that all rendering simply returns a string. However, rendering a layout does not...

3468 Some assertions for the testing of ActionView::TestCase are worthless was updated in Ruby on Rails
  • Chris Hapgood
    Chris Hapgood commented at 10:38 PM

    Looks like I doubled up the original patch. Here is the proper one.

  • Chris Hapgood
    Chris Hapgood created the ticket at 10:35 PM

    In view/test_case_test.rb there are several assertions of this form:

    assert 'Holla!', from_shared_helper
    

    How useful is that?!

    Attached is a patch that makes m...