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.

Matt Jones's latest activity

Saturday, January 16 2010
3709 [PATCH] load initializers before routing was updated in Ruby on Rails
  • Matt Jones
    Matt Jones commented at 9:33 PM

    Was there a particular reason this behavior was changed in the rewrite of the initializer? It appears that initializers were before routes as of 2.3.5...

Wednesday, January 13 2010
3685 ActionPack 2.3.5 gem declares incompatibility with rack 1.1.0 was updated in Ruby on Rails
  • Matt Jones
    Matt Jones commented at 1:44 AM

    There's also an issue where the gemspec specifies '~> 1.0.0', but the code actually calls gem 'rack' with a version of 1.0.1, meaning that installing 2.3.5 over...

3687 nested attributes with belongs_to only supports one use case was updated in Ruby on Rails
  • Matt Jones
    Matt Jones commented at 1:38 AM

    Not sure if there's a bug here - case 3 in your example can be done by dropping / removing the hidden id field, and I'm not sure what you're looking for in case...

Thursday, January 07 2010
3667 Array of records from ActiveRecord Association does not behave as expected was updated in Ruby on Rails
  • Matt Jones
    Matt Jones commented at 9:32 PM

    This is a common gotcha in Ruby - objects are pretty much passed around as references. An example:

    a = [1,2,3]
    b = a
    a << 4
    b # => [1,2,3,4]
    

    So in your exampl...

  • Matt Jones
    • State changed from new to wontfix
    by Matt Jones at 7:04 PM

    This behavior is by design - @record.contracts doesn't actually return an Array, but an instance of AssociationCollection that mostly pretends to be an array. T...

2909 Polymorphic many to many relationships... was updated in Ruby on Rails
  • Matt Jones
    Matt Jones commented at 9:25 PM

    The issue is that if you're not using STI on Target in the example above, the standard HABTM join record with just two ids isn't sufficient to identify the targ...

  • Matt Jones
    Matt Jones commented at 7:07 PM

    There's has_many_polymorphs, which does much of what you're describing. You'll also probably have much more luck with an explicit join model and has_many :throu...

Monday, January 04 2010
3252 add_index on postgresql with long index names: migrations fail with Input str... was updated in Ruby on Rails
  • Matt Jones
    Matt Jones commented at 7:18 PM

    There's a more general issue where the AR adapters don't have any details about the various adapter's limits; see #3452 for a patch I'm working on to clean up t...

Thursday, December 10 2009
3558 Actionpack 2.3.5 gemspec and Rack requirement don't match was updated in Ruby on Rails