• J
    Avoid violating key constraints in fixture HABTM associations · cf1d75d9
    James Le Cuirot 提交于
    When loading fixtures, Ruby 1.9's hash key ordering means that HABTM
    join table rows are always loaded before the parent table rows,
    violating foreign key constraints that may be in place. This very
    simple change ensures that the parent table's key appears first in the
    hash. Violations may still occur if fixtures are loaded in the wrong
    order but those instances can be avoided unlike this one.
    cf1d75d9
fixtures_test.rb 43.1 KB