1. 18 5月, 2011 1 次提交
  2. 13 5月, 2011 1 次提交
  3. 11 5月, 2011 2 次提交
  4. 13 4月, 2011 1 次提交
  5. 18 2月, 2011 1 次提交
  6. 14 2月, 2011 1 次提交
  7. 30 1月, 2011 1 次提交
  8. 12 1月, 2011 5 次提交
  9. 08 1月, 2011 1 次提交
  10. 04 1月, 2011 1 次提交
    • J
      Remove undocumented feature from has_one where you could pass false as the... · 40afcade
      Jon Leighton 提交于
      Remove undocumented feature from has_one where you could pass false as the second parameter to build_assoc or create_assoc, and the existing associated object would be untouched (the foreign key would not be nullified, and it would not be deleted). If you want behaviour similar to this you can do the following things:
      
      * Use :dependent => :nullify (or don't specify :dependent) if you want to prevent the existing associated object from being deleted
      * Use has_many if you actually want multiple associated objects
      * Explicitly set the foreign key if, for some reason, you really need to have multiple objects associated with the same has_one. E.g.
      
          previous = obj.assoc
          obj.create_assoc
          previous.update_attributes(:obj_id => obj.id)
      40afcade
  11. 23 11月, 2010 1 次提交
  12. 09 11月, 2010 1 次提交
  13. 29 9月, 2010 1 次提交
  14. 17 8月, 2010 1 次提交
  15. 19 5月, 2010 1 次提交
  16. 28 3月, 2010 1 次提交
  17. 16 3月, 2010 1 次提交
  18. 09 3月, 2010 1 次提交
  19. 02 1月, 2010 1 次提交
  20. 28 9月, 2009 1 次提交
  21. 12 9月, 2009 1 次提交
  22. 12 5月, 2009 1 次提交
  23. 02 5月, 2009 1 次提交
  24. 21 3月, 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. 21 8月, 2008 1 次提交
  31. 01 8月, 2008 1 次提交
  32. 07 7月, 2008 1 次提交
  33. 11 6月, 2008 1 次提交
  34. 24 5月, 2008 2 次提交