1. 18 8月, 2016 1 次提交
  2. 16 8月, 2016 1 次提交
  3. 14 8月, 2016 1 次提交
  4. 08 8月, 2016 1 次提交
  5. 07 8月, 2016 2 次提交
  6. 03 8月, 2016 1 次提交
  7. 02 8月, 2016 1 次提交
  8. 21 5月, 2016 1 次提交
  9. 19 5月, 2016 1 次提交
  10. 20 3月, 2016 1 次提交
  11. 11 2月, 2016 1 次提交
  12. 10 2月, 2016 1 次提交
  13. 03 2月, 2016 1 次提交
  14. 23 11月, 2015 1 次提交
  15. 20 10月, 2015 1 次提交
  16. 13 8月, 2015 1 次提交
  17. 03 8月, 2015 1 次提交
  18. 16 7月, 2015 1 次提交
    • P
      Deprecate force association reload by passing true · 6eae366d
      Prem Sichanugrist 提交于
      This is to simplify the association API, as you can call `reload` on the
      association proxy or the parent object to get the same result.
      
      For collection association, you can call `#reload` on association proxy
      to force a reload:
      
          @user.posts.reload   # Instead of @user.posts(true)
      
      For singular association, you can call `#reload` on the parent object to
      clear its association cache then call the association method:
      
          @user.reload.profile   # Instead of @user.profile(true)
      
      Passing a truthy argument to force association to reload will be removed
      in Rails 5.1.
      6eae366d
  19. 04 4月, 2015 1 次提交
  20. 16 3月, 2015 1 次提交
  21. 12 3月, 2015 1 次提交
    • B
      Isolate access to .default_scopes in ActiveRecord::Scoping::Default · c1deb81c
      Ben Woosley 提交于
      Instead use .scope_attributes? consistently in ActiveRecord to check whether
      there are attributes currently associated with the scope.
      
      Move the implementation of .scope_attributes? and .scope_attributes to
      ActiveRecord::Scoping because they don't particularly have to do specifically
      with Named scopes and their only dependency, in the case of
      .scope_attributes?, and only caller, in the case of .scope_attributes is
      contained in Scoping.
      c1deb81c
  22. 28 2月, 2015 1 次提交
  23. 21 2月, 2015 1 次提交
  24. 18 2月, 2015 1 次提交
  25. 13 2月, 2015 1 次提交
  26. 27 1月, 2015 1 次提交
    • S
      Move flattening records added to an association farther out · 025187d9
      Sean Griffin 提交于
      There are many ways that things end up getting passed to `concat`. Not
      all of those entry points called `flatten` on their input. It seems that
      just about every method that is meant to take a single record, or that
      splats its input, is meant to also take an array. `concat` is the
      earliest point that is common to all of the methods which add records to
      the association. Partially fixes #18689
      025187d9
  27. 02 1月, 2015 1 次提交
  28. 26 12月, 2014 1 次提交
  29. 29 11月, 2014 1 次提交
  30. 26 11月, 2014 1 次提交
    • S
      Setting an association replaces records with the same id in memory · dd986814
      Sean Griffin 提交于
      The records weren't being replaced since equality in Active Record is
      defined in terms of `id` only. It is reasonable to expect that the
      references would be replaced in memory, even if no queries are actually
      executed. This change did not appear to affect any other parts of the
      code base. I chose not to execute callbacks since we're not actually
      modifying the association in a way that will be persisted.
      
      Fixes #17730
      dd986814
  31. 21 11月, 2014 1 次提交
    • C
      Wrap code snippets in +, not backticks, in sdoc · 5aedabe8
      claudiob 提交于
      I grepped the source code for code snippets wrapped in backticks in the comments
      and replaced the backticks with plus signs so they are correctly displayed in
      the Rails documentation.
      
      [ci skip]
      5aedabe8
  32. 08 11月, 2014 1 次提交
  33. 15 10月, 2014 1 次提交
  34. 03 10月, 2014 1 次提交
    • B
      Fix that a collection proxy could be cached before the save of the owner,... · cc405496
      Ben Woosley 提交于
      Fix that a collection proxy could be cached before the save of the owner, resulting in an invalid proxy lacking the owner’s id.
      
      Absent this fix calls like: owner.association.update_all to behave unexpectedly because they try to act on association objects where
      owner_id is null.
      
      more evidence here: https://gist.github.com/Empact/5865555
      ```
      Active Record 3.2.13
      -- create_table(:firms, {:force=>true})
         -> 0.1371s
      -- create_table(:clients, {:force=>true})
         -> 0.0005s
      1 clients. 1 expected.
      1 clients updated. 1 expected.
      ```
      
      ```
      Active Record 4.0.0
      -- create_table(:firms, {:force=>true})
         -> 0.1606s
      -- create_table(:clients, {:force=>true})
         -> 0.0004s
      1 clients. 1 expected.
      0 clients updated. 1 expected.
      ```
      cc405496
  35. 04 9月, 2014 1 次提交
    • S
      Skip StatementCache for eager loaded associations (Fixes #16761) · 4abbdbdf
      Sammy Larbi 提交于
      Eagerly loaded collection and singular associations are ignored by the StatementCache, which causes errors when the queries they generate reference columns that were not eagerly loaded.
      
      This commit skips the creation of the StatementCache as a fix for these scenarios.
      4abbdbdf
  36. 18 6月, 2014 1 次提交
  37. 10 6月, 2014 1 次提交
    • S
      Rename `type_cast` to `type_cast_from_database` · d24e6407
      Sean Griffin 提交于
      In some cases there is a difference between the two, we should always
      be doing one or the other. For convenience, `type_cast` is still a
      private method on type, so new types that do not need different behavior
      don't need to implement two methods, but it has been moved to private so
      it cannot be used accidentally.
      d24e6407
  38. 18 5月, 2014 1 次提交
    • E
      early return on delete and destroy methods · 540262af
      eileencodes 提交于
      When delete or destroy is called on all records nothing
      is deleted or destroyed. Intead of running through the code and still
      not deleteing anything, we should early return
      540262af
  39. 14 5月, 2014 1 次提交