1. 31 7月, 2012 1 次提交
  2. 28 7月, 2012 1 次提交
  3. 27 7月, 2012 1 次提交
    • J
      ActiveRecord::Base.all returns a Relation. · 6a81ccd6
      Jon Leighton 提交于
      Previously it returned an Array.
      
      If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This
      is more explicit.
      
      In most cases this should not break existing code, since
      Relations use method_missing to delegate unknown methods to #to_a
      anyway.
      6a81ccd6
  4. 25 7月, 2012 1 次提交
  5. 21 7月, 2012 2 次提交
  6. 18 7月, 2012 1 次提交
  7. 13 7月, 2012 1 次提交
  8. 30 6月, 2012 1 次提交
  9. 12 6月, 2012 1 次提交
  10. 29 5月, 2012 1 次提交
    • F
      Add support for CollectionAssociation#delete by Fixnum or String · 39f06984
      Francesco Rodriguez 提交于
      I found the next issue between CollectionAssociation `delete`
      and `destroy`.
      
          class Person < ActiveRecord::Base
            has_many :pets
          end
      
          person.pets.destroy(1)
          # => OK, returns the destroyed object
      
          person.pets.destroy("2")
          # => OK, returns the destroyed object
      
          person.pets.delete(1)
          # => ActiveRecord::AssociationTypeMismatch
      
          person.pets.delete("2")
          # => ActiveRecord::AssociationTypeMismatch
      
      Adding support for deleting with a fixnum or string like
      `destroy` method.
      39f06984
  11. 26 5月, 2012 1 次提交
    • P
      Make connection pool fair with respect to waiting threads. · 02b23355
      Patrick Mahoney 提交于
      The core of this fix is a threadsafe, fair Queue class.  It is
      very similar to Queue in stdlib except that it supports waiting
      with a timeout.
      
      The issue this solves is that if several threads are contending for
      database connections, an unfair queue makes is possible that a thread
      will timeout even while other threads successfully acquire and release
      connections.  A fair queue means the thread that has been waiting the
      longest will get the next available connection.
      
      This includes a few test fixes to avoid test ordering issues that
      cropped up during development of this patch.
      02b23355
  12. 19 5月, 2012 2 次提交
  13. 18 5月, 2012 1 次提交
  14. 17 5月, 2012 1 次提交
  15. 12 5月, 2012 2 次提交
    • J
      Remove #=== quirk · 2091e5a6
      Jon Leighton 提交于
      Makes it consistent with Relation. Can't see a use for this.
      2091e5a6
    • J
      CollectionProxy < Relation · c86a32d7
      Jon Leighton 提交于
      This helps bring the interfaces of CollectionProxy and Relation closer
      together, and reduces the delegation backflips we need to perform.
      
      For example, first_or_create is defined thus:
      
      class ActiveRecord::Relation
        def first_or_create(...)
          first || create(...)
        end
      end
      
      If CollectionProxy < Relation, then post.comments.first_or_create will
      hit the association's #create method which will actually add the new record
      to the association, just as post.comments.create would.
      
      With the previous delegation, post.comments.first_or_create expands to
      post.comments.scoped.first_or_create, where post.comments.scoped has no
      knowledge of the association.
      c86a32d7
  16. 03 5月, 2012 1 次提交
  17. 27 4月, 2012 8 次提交
  18. 09 3月, 2012 1 次提交
  19. 06 3月, 2012 1 次提交
  20. 02 2月, 2012 1 次提交
  21. 01 2月, 2012 2 次提交
  22. 31 1月, 2012 2 次提交
  23. 29 1月, 2012 1 次提交
  24. 20 1月, 2012 1 次提交
  25. 28 12月, 2011 1 次提交
  26. 25 11月, 2011 1 次提交
  27. 04 11月, 2011 1 次提交
  28. 28 9月, 2011 1 次提交