1. 26 7月, 2017 4 次提交
  2. 25 7月, 2017 1 次提交
  3. 23 7月, 2017 1 次提交
  4. 20 7月, 2017 5 次提交
  5. 17 7月, 2017 1 次提交
    • S
      Post.joins(:users) should not be affected by `User.current_scope` · f1e1f708
      Sean Griffin 提交于
      This change was introduced by #18109. The intent of that change was to
      specifically apply `unscoped`, not to allow all changes to
      `current_scope` to affect the join. The idea of allowing `current_scope`
      to affect joins is interesting and potentially more consistent, but has
      sever problems associated with it. The fact that we're specifically
      stripping out joins indicates one such problem (and potentially leads to
      invalid queries).
      
      Ultimately it's difficult to reason about what `Posts.joins(:users)`
      actually means if it's affected by `User.current_scope`, and it's
      difficult to specifically control what does or doesn't get added. If we
      were starting from scratch, I don't think I'd have `joins` be affected
      by `default_scope` either, but that's too big of a breaking change to
      make at this point.
      
      With this change, we no longer apply `current_scope` when bringing in
      joins, with the singular exception of the motivating use case which
      introduced this bug, which is providing a way to *opt-out* of having the
      default scope apply to joins.
      
      Fixes #29338.
      f1e1f708
  6. 11 7月, 2017 7 次提交
  7. 06 7月, 2017 1 次提交
  8. 05 7月, 2017 3 次提交
  9. 01 7月, 2017 4 次提交
  10. 28 6月, 2017 3 次提交
  11. 24 6月, 2017 3 次提交
  12. 20 6月, 2017 5 次提交
  13. 18 6月, 2017 1 次提交
  14. 16 6月, 2017 1 次提交