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.

Jon Leighton's latest activity

Sunday, December 19 2010
3684 find creates wrong SQL when you set "has_one :through" association on :join o... was updated in Ruby on Rails
  • Jon Leighton
    • Assigned user changed from Pratik to Aaron Patterson
    by Jon Leighton at 5:05 PM

    This is a duplicate of #2801. I have run the tests proposed here against the fix I submitted to #2801 and verified that it does indeed fix this ticket too. So c...

2801 incorrect sql from has_many :through was updated in Ruby on Rails
  • Jon Leighton
    Jon Leighton commented at 4:41 PM

    Just realised the file name of that patch says 2461. This is a mistake, but rest assured the patch is definitely concerned with this ticket and not a different ...

2990 [PATCH] Non standard ID column on has_many :through was updated in Ruby on Rails
  • Jon Leighton
    • Assigned user changed from Santiago Pastorino to Aaron Patterson
    • Tag changed from hasmany, patch, primarykey, review to hasmany, patch, primarykey, review, verified
    by Jon Leighton at 4:11 PM

    I have updated Szymon Nowak's patch to current master, and verified that it works correctly.

    Note that two of the tests (test_associate_existing_with_nonstandar...

2976 has_one :through preload drops conditions was updated in Ruby on Rails
  • Jon Leighton
    • Assigned user changed from Frederick Cheung to Aaron Patterson
    • Tag changed from 3.0, :include, activerecord, bug, has_one, preload, through to 3.0, :include, activerecord, bug, has_one, patch, preload, through
    • Importance changed from to
    by Jon Leighton at 3:18 PM

    Here is an updated version of Will's test which applies cleanly to current master (the previous version did not). I have run it and can confirm that it passes, ...

2912 has_one through doesn't work when going through a collection association was updated in Ruby on Rails
  • Jon Leighton
    • Assigned user set to Aaron Patterson
    • Title changed from has_one through fails when setter is overridden using alias_method to has_one through doesn't work when going through a collection association
    • Tag changed from 2.2.2, 3.0.0.beta, activerecord, alias_method, associations, bugmash, has_one_through, update_attributes, verified to 2.2.2, 3.0.0.beta, activerecord, alias_method, associations, bugmash, has_one_through, patch, update_attributes
    by Jon Leighton at 2:19 PM

    This is not actually a problem with aliases at all.

    The problem is with putting a has_one association :through a collection (i.e. has_many). HasOneThroughAssoci...

Thursday, December 16 2010
2801 incorrect sql from has_many :through was updated in Ruby on Rails
  • Jon Leighton
    • Assigned user set to Aaron Patterson
    • Tag changed from :through, :through_conditions, bugmash, has_many, has_many_through to :through, :through_conditions, bugmash, has_many, has_many_through, patch
    by Jon Leighton at 10:31 AM

    I can confirm this. It affects queries involving joins, so while the above example using count doesn't quite seem to make sense, a query in the form Foo.joins(:...

2461 Joined table not quoted with has_many :through was updated in Ruby on Rails
  • Jon Leighton
    • Assigned user set to Aaron Patterson
    • Importance changed from to
    by Jon Leighton at 8:58 AM

    This is fixed in master so it can be closed. The behaviour is captured by test_inner_join_with_quoted_table_name in has_many_through_associations_test.rb and te...

2447 :uniq option doesn't work with has_many :through and eager loading was updated in Ruby on Rails
  • Jon Leighton
    • Assigned user set to Aaron Patterson
    • Tag changed from activerecord, eager_loading, has_many_through, uniq to activerecord, eager_loading, has_many_through, patch, uniq
    • Importance changed from to
    by Jon Leighton at 12:51 AM

    Here is a patch which fixes this, with tests.

2451 has_many :through associations give different results depending on eager-load... was updated in Ruby on Rails
  • Jon Leighton
    • Assigned user set to Aaron Patterson
    • Importance changed from to
    by Jon Leighton at 12:35 AM

    Can this ticket be closed or at least marked as stale please? If you look at association_preload.rb in current master, you will see that it does Array.wrap(asso...

2421 Problem with has_many :through and alternate keys was updated in Ruby on Rails
  • Jon Leighton
    Jon Leighton commented at 12:18 AM

    Alex, have you tried with the patch I just uploaded? That should fix it - the test 'test_has_many_through_with_custom_primary_key_on_belongs_to_source' is targe...