1. 17 9月, 2012 1 次提交
  2. 13 9月, 2012 1 次提交
  3. 02 8月, 2012 3 次提交
    • J
      s/scoped/scope/ · b33e7ba1
      Jon Leighton 提交于
      b33e7ba1
    • J
      Add CollectionProxy#scope · 0e1cafcb
      Jon Leighton 提交于
      This can be used to get a Relation from an association.
      
      Previously we had a #scoped method, but we're deprecating that for
      AR::Base, so it doesn't make sense to have it here.
      
      This was requested by DHH, to facilitate code like this:
      
          Project.scope.order('created_at DESC').page(current_page).tagged_with(@tag).limit(5).scoping do
            @topics      = @project.topics.scope
            @todolists   = @project.todolists.scope
            @attachments = @project.attachments.scope
            @documents   = @project.documents.scope
          end
      0e1cafcb
    • J
      Use explicit delegations · 26d3e325
      Jon Leighton 提交于
      This makes it easier to see what the documentation refers to.
      
      It also means that we are not doing unnecessary work for delegations
      that have no args / splats / block / etc.
      26d3e325
  4. 31 7月, 2012 2 次提交
  5. 28 7月, 2012 1 次提交
  6. 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
  7. 28 5月, 2012 1 次提交
  8. 27 5月, 2012 1 次提交
  9. 26 5月, 2012 5 次提交
  10. 24 5月, 2012 1 次提交
  11. 23 5月, 2012 8 次提交
  12. 22 5月, 2012 7 次提交
  13. 21 5月, 2012 2 次提交
  14. 20 5月, 2012 2 次提交
  15. 19 5月, 2012 4 次提交