1. 12 5月, 2009 1 次提交
  2. 10 5月, 2009 2 次提交
  3. 05 5月, 2009 1 次提交
    • M
      Providing support for :inverse_of as an option to associations. · ccea9838
      Murray Steele 提交于
      You can now add an :inverse_of option to has_one, has_many and belongs_to associations.  This is best described with an example:
      
      class Man < ActiveRecord::Base
        has_one :face, :inverse_of => :man
      end
      
      class Face < ActiveRecord::Base
        belongs_to :man, :inverse_of => :face
      end
      
      m = Man.first
      f = m.face
      
      Without :inverse_of m and f.man would be different instances of the same object (f.man being pulled from the database again).  With these new :inverse_of options m and f.man are the same in memory instance.
      
      Currently :inverse_of supports has_one and has_many (but not the :through variants) associations.  It also supplies inverse support for belongs_to associations where the inverse is a has_one and it's not a polymorphic.
      Signed-off-by: NMurray Steele <muz@h-lame.com>
      Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
      ccea9838
  4. 21 4月, 2009 1 次提交
  5. 20 4月, 2009 1 次提交
  6. 17 4月, 2009 1 次提交
  7. 12 3月, 2009 1 次提交
  8. 07 3月, 2009 3 次提交
  9. 27 2月, 2009 2 次提交
  10. 24 2月, 2009 1 次提交
  11. 06 2月, 2009 1 次提交
  12. 02 2月, 2009 1 次提交
  13. 01 2月, 2009 1 次提交
  14. 17 1月, 2009 1 次提交
  15. 01 1月, 2009 2 次提交
  16. 29 12月, 2008 1 次提交
  17. 27 12月, 2008 2 次提交
  18. 21 12月, 2008 2 次提交
  19. 19 12月, 2008 3 次提交
  20. 02 12月, 2008 1 次提交
  21. 26 11月, 2008 1 次提交
  22. 25 11月, 2008 1 次提交
  23. 07 11月, 2008 1 次提交
  24. 02 11月, 2008 1 次提交
  25. 01 11月, 2008 2 次提交
  26. 24 10月, 2008 1 次提交
  27. 22 10月, 2008 1 次提交
  28. 10 10月, 2008 2 次提交
  29. 06 10月, 2008 1 次提交