1. 23 6月, 2009 1 次提交
  2. 22 6月, 2009 4 次提交
  3. 09 6月, 2009 2 次提交
  4. 01 6月, 2009 1 次提交
  5. 29 5月, 2009 1 次提交
  6. 22 5月, 2009 1 次提交
  7. 19 5月, 2009 4 次提交
  8. 18 5月, 2009 4 次提交
  9. 17 5月, 2009 1 次提交
  10. 14 5月, 2009 3 次提交
  11. 12 5月, 2009 2 次提交
  12. 10 5月, 2009 4 次提交
  13. 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
  14. 02 5月, 2009 2 次提交
  15. 01 5月, 2009 2 次提交
  16. 30 4月, 2009 1 次提交
  17. 28 4月, 2009 1 次提交
  18. 24 4月, 2009 1 次提交
  19. 23 4月, 2009 1 次提交
    • R
      * Add pluggable JSON backends with support for the JSON gem. [rick] · 3c4c6bd0
      rick 提交于
          Example: ActiveSupport::JSON.backend = "JSONGem"
      
        All internal Rails JSON encoding is now handled by ActiveSupport::JSON.encode().  Use of #to_json is not recommended, as it may clash with other libraries that overwrite it.  However, you can recover Rails specific functionality
        if you really want to use #to_json.
      
          gem 'json'
          ActiveSupport::JSON.backend = "JSONGem"
      
          class ActiveRecord::Base
            alias to_json rails_to_json
          end
      3c4c6bd0
  20. 22 4月, 2009 1 次提交
  21. 21 4月, 2009 2 次提交