1. 29 1月, 2017 1 次提交
    • R
      Reload `through_record` that has been destroyed in `create_through_record` · e09da8bf
      Ryuta Kamizono 提交于
      This is an alternative of #27714.
      
      If `has_one :through` association has set `nil`, `through_record` is
      destroyed but still remain loaded target in `through_proxy` until
      `reload` or `reset` explicitly.
      
      If `through_proxy` is not reset (remain destroyed (frozen) target),
      setting new record causes `RuntimeError: Can't modify frozen hash`.
      
      To prevent `RuntimeError`, should reload `through_record` that has been
      destroyed in `create_through_record`.
      e09da8bf
  2. 23 7月, 2016 1 次提交
  3. 04 1月, 2013 1 次提交
  4. 22 2月, 2011 2 次提交
  5. 18 2月, 2011 2 次提交
  6. 30 1月, 2011 1 次提交
  7. 17 1月, 2011 2 次提交
  8. 12 1月, 2011 2 次提交
  9. 04 1月, 2011 1 次提交
    • 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
  10. 27 12月, 2010 3 次提交
  11. 24 12月, 2010 1 次提交
  12. 16 12月, 2010 2 次提交
  13. 28 11月, 2010 1 次提交
  14. 09 11月, 2010 1 次提交
  15. 31 10月, 2010 1 次提交
  16. 30 10月, 2010 1 次提交
    • J
      Refactoring: replace the mix of variables like @finder_sql, @counter_sql, etc... · b82fab25
      Jon Leighton 提交于
      Refactoring: replace the mix of variables like @finder_sql, @counter_sql, etc with just a single scope hash (created on initialization of the proxy). This is now used consistently across all associations. Therefore, all you have to do to ensure finding/counting etc is done correctly is implement the scope correctly.
      b82fab25
  17. 18 10月, 2010 1 次提交
    • J
      Refactoring: replace the mix of variables like @finder_sql, @counter_sql, etc... · 78b8c51c
      Jon Leighton 提交于
      Refactoring: replace the mix of variables like @finder_sql, @counter_sql, etc with just a single scope hash (created on initialization of the proxy). This is now used consistently across all associations. Therefore, all you have to do to ensure finding/counting etc is done correctly is implement the scope correctly.
      78b8c51c
  18. 16 10月, 2010 1 次提交
  19. 17 6月, 2010 1 次提交
  20. 10 8月, 2009 1 次提交
  21. 13 6月, 2009 1 次提交
  22. 17 5月, 2009 1 次提交
  23. 16 11月, 2008 1 次提交
  24. 27 8月, 2008 1 次提交
  25. 06 4月, 2008 1 次提交
  26. 22 3月, 2008 1 次提交