1. 13 5月, 2016 1 次提交
    • S
      Give more context from `AssociationMismatchError` · 0991c4c6
      Sean Griffin 提交于
      The error message that we give today makes this error difficult to debug
      if you receive it. I have no clue why we're printing the object ID of
      the class (the commit doesn't give context), but I've left it as it was
      deliberate.
      0991c4c6
  2. 29 4月, 2016 1 次提交
  3. 02 3月, 2016 1 次提交
  4. 17 12月, 2015 1 次提交
  5. 23 9月, 2015 1 次提交
  6. 27 8月, 2015 1 次提交
  7. 13 8月, 2015 1 次提交
  8. 17 7月, 2015 1 次提交
    • P
      Silence deprecation warning from force reload · b5b89796
      Prem Sichanugrist 提交于
      We deprecate the support for passing an argument to force reload in
      6eae366d. That led to several
      deprecation warning when running Active Record test suite.
      
      This commit silence the warnings by properly calling `#reload` on the
      association proxy or on the association object instead. However, there
      are several places that `ActiveSupport::Deprecation.silence` are used as
      those tests actually tests the force reload functionality and will be
      removed once `master` is targeted next minor release (5.1).
      b5b89796
  9. 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
  10. 22 6月, 2015 1 次提交
  11. 17 6月, 2015 1 次提交
  12. 14 6月, 2015 1 次提交
  13. 21 4月, 2015 1 次提交
    • A
      Rename association option :class to :anonymous_class · ac2b7a5c
      Andrew White 提交于
      In 1f006c an option was added called :class to allow passing anonymous
      classes to association definitions. Since using :class instead of
      :class_name is a fairly common typo even amongst experienced developers
      this can result in hard to debug errors arising in raise_on_type_mismatch?
      
      To fix this we're renaming the option from :class to :anonymous_class as
      that is a more correct description of what the option is for. Since this
      was an internal, undocumented option there is no need for a deprecation.
      
      Fixes #19659
      ac2b7a5c
  14. 09 4月, 2015 2 次提交
  15. 22 2月, 2015 1 次提交
  16. 27 1月, 2015 1 次提交
  17. 14 11月, 2014 1 次提交
  18. 08 11月, 2014 1 次提交
  19. 29 9月, 2014 1 次提交
    • B
      Isolate access to @associations_cache and @aggregations cache to the... · 9d569585
      Ben Woosley 提交于
      Isolate access to @associations_cache and @aggregations cache to the Associations and Aggregations modules, respectively.
      
      This includes replacing the `association_cache` accessor with a more
      limited `association_cached?` accessor and making `clear_association_cache`
      and `clear_aggregation_cache` private.
      9d569585
  20. 09 7月, 2014 1 次提交
  21. 06 7月, 2014 1 次提交
  22. 28 6月, 2014 3 次提交
  23. 26 6月, 2014 1 次提交
    • S
      Deprecate automatic counter caches on has_many :through · d730e374
      Sean Griffin 提交于
      Reliant on https://github.com/rails/rails/pull/15747 but pulled to a
      separate PR to reduce noise. `has_many :through` associations have the
      undocumented behavior of automatically detecting counter caches.
      However, the way in which it does so is inconsistent with counter caches
      everywhere else, and doesn't actually work consistently.
      
      As with normal `has_many` associations, the user should specify the
      counter cache on the `belongs_to`, if they'd like it updated.
      d730e374
  24. 21 5月, 2014 2 次提交
  25. 14 4月, 2014 2 次提交
  26. 05 4月, 2014 1 次提交
  27. 26 3月, 2014 1 次提交
  28. 18 3月, 2014 1 次提交
  29. 15 3月, 2014 1 次提交
    • W
      Still touch associations when theres no timestamp · ea3a73e7
      Washington Luiz 提交于
      Prior to Rails 4.0.4 when touching a object which doesn't have timestamp
      attributes (updated_at / updated_on) rails would still touch all
      associations. After 73ba2c14 it updates
      associations but rollsback because `touch` would return nil since
      there's no timestamp attribute
      ea3a73e7
  30. 20 2月, 2014 1 次提交
  31. 31 1月, 2014 1 次提交
  32. 22 1月, 2014 1 次提交
  33. 23 12月, 2013 1 次提交
  34. 18 12月, 2013 1 次提交
  35. 29 11月, 2013 1 次提交