1. 12 1月, 2011 1 次提交
  2. 08 1月, 2011 1 次提交
  3. 05 1月, 2011 1 次提交
  4. 04 1月, 2011 2 次提交
    • J
      Allow assignment on has_one :through where the owner is a new record [#5137 state:resolved] · a0be389d
      Jon Leighton 提交于
      This required changing the code to keep the association proxy for a belongs_to around, despite its target being nil. Which in turn required various changes to the way that stale target checking is handled, in order to support various edge cases (loaded target is nil then foreign key added, foreign key is changed and then changed back, etc). A side effect is that the code is nicer and more succinct.
      
      Note that I am removing test_no_unexpected_aliasing since that is basically checking that the proxy for a belongs_to *does* change, which is the exact opposite of the intention of this commit. Also adding various tests for various edge cases and related things.
      
      Phew, long commit message!
      a0be389d
    • J
      Some basic tests for the :foreign_type option on belongs_to, which was... · 16065b4f
      Jon Leighton 提交于
      Some basic tests for the :foreign_type option on belongs_to, which was previously completely untested.
      16065b4f
  5. 01 1月, 2011 2 次提交
  6. 24 12月, 2010 1 次提交
  7. 09 12月, 2010 1 次提交
  8. 09 11月, 2010 1 次提交
  9. 31 10月, 2010 1 次提交
  10. 29 9月, 2010 1 次提交
  11. 23 8月, 2010 1 次提交
  12. 17 8月, 2010 1 次提交
  13. 02 8月, 2010 1 次提交
  14. 30 7月, 2010 1 次提交
  15. 22 7月, 2010 1 次提交
  16. 05 6月, 2010 1 次提交
  17. 19 5月, 2010 1 次提交
  18. 10 4月, 2010 1 次提交
  19. 30 3月, 2010 2 次提交
  20. 28 3月, 2010 1 次提交
  21. 09 3月, 2010 1 次提交
  22. 10 8月, 2009 1 次提交
  23. 07 8月, 2009 1 次提交
  24. 16 7月, 2009 1 次提交
  25. 12 3月, 2009 1 次提交
  26. 09 3月, 2009 1 次提交
  27. 07 3月, 2009 1 次提交
  28. 27 2月, 2009 1 次提交
  29. 14 10月, 2008 1 次提交
  30. 10 10月, 2008 1 次提交
  31. 13 9月, 2008 1 次提交
  32. 01 8月, 2008 1 次提交
  33. 11 6月, 2008 1 次提交
  34. 01 6月, 2008 2 次提交
    • T
      belongs_to polymorphic association assignments update the foreign_id and... · 0580b31b
      Tim Harper 提交于
      belongs_to polymorphic association assignments update the foreign_id and foreign_type fields regardless of whether the record being assigned is new or not.
      
      fixes the following scenarios:
      * I have validates_inclusion_of on the type field for a polymorphic belongs_to association.  I assign a new record to the model's polymorphic relationship of the proper type.  validation fails because the type field has not been updated.
      
      * I replace the value for a ppolymorphic association to a new record of another class.  The type field still says its the previous class, and the id field points to the previous record as well.
      
      [#191 state:closed]
      0580b31b
    • T
      belongs_to polymorphic association assignments update the foreign_id and... · aef47dcf
      Tim Harper 提交于
      belongs_to polymorphic association assignments update the foreign_id and foreign_type fields regardless of whether the record being assigned is new or not.
      
      fixes the following scenarios:
      * I have validates_inclusion_of on the type field for a polymorphic belongs_to association.  I assign a new record to the model's polymorphic relationship of the proper type.  validation fails because the type field has not been updated.
      
      * I replace the value for a ppolymorphic association to a new record of another class.  The type field still says its the previous class, and the id field points to the previous record as well.
      aef47dcf
  35. 24 5月, 2008 1 次提交
  36. 20 5月, 2008 1 次提交