1. 18 1月, 2019 1 次提交
  2. 26 9月, 2018 1 次提交
  3. 26 4月, 2018 1 次提交
  4. 19 4月, 2018 1 次提交
  5. 30 3月, 2018 1 次提交
  6. 26 1月, 2018 3 次提交
  7. 28 11月, 2017 1 次提交
  8. 09 11月, 2017 2 次提交
  9. 13 8月, 2017 1 次提交
  10. 20 7月, 2017 1 次提交
  11. 02 7月, 2017 1 次提交
  12. 01 7月, 2017 1 次提交
  13. 01 6月, 2017 1 次提交
  14. 19 3月, 2017 1 次提交
    • R
      Use `load` rather than `collect` for force loading · 59db5f22
      Ryuta Kamizono 提交于
      Since b644964b `ActiveRecord::Relation` includes `Enumerable` so
      delegating `collect`, `all?`, and `include?` are also unneeded.
      `collect` without block returns `Enumerable` without preloading by that.
      We should use `load` rather than `collect` for force loading.
      59db5f22
  15. 25 2月, 2017 1 次提交
  16. 29 10月, 2016 1 次提交
  17. 17 9月, 2016 1 次提交
  18. 16 8月, 2016 1 次提交
  19. 07 8月, 2016 3 次提交
  20. 19 7月, 2016 1 次提交
    • S
      Fix the calling `merge` method at first in a scope · cf2574b1
      suginoy 提交于
      Changing the order of method chaining `merge` and other query
      method such as `joins` should produce the same result.
      
      ```ruby
      class Topic < ApplicationRecord
        scope :safe_chaininig,   -> { joins(:comments).merge(Comment.newest) }
        scope :unsafe_chaininig, -> { merge(Comment.newest).joins(:comments) } #=> NoMethodError
      end
      ```
      cf2574b1
  21. 05 5月, 2016 1 次提交
  22. 03 5月, 2016 1 次提交
    • S
      Do not delegate `AR::Base#empty?` to `all` · 98264a13
      Sean Griffin 提交于
      Unlike `one?` and `none?`, `empty?` has interactions with methods
      outside of enumerable. It also doesn't fit in the same vein.
      `Topic.any?` makes sense. `Topic.empty?` does not, as `Topic` is not a
      container.
      
      Fixes #24808
      Close #24812
      98264a13
  23. 29 3月, 2016 1 次提交
  24. 28 1月, 2016 3 次提交
  25. 26 8月, 2015 1 次提交
  26. 21 2月, 2015 1 次提交
    • F
      Error message testing fix · b1d26350
      Franky W 提交于
      The testing of error messages have been implemented wrongly a few times.
      This is an attempt to fix it.
      
      For example, some of these test should have failed with the new code.
      The reason they are not failling with the new string is the fact they
      were not being tested beforehand.
      b1d26350
  27. 28 1月, 2015 1 次提交
    • S
      `WhereClause#predicates` does not need to be public · d26dd008
      Sean Griffin 提交于
      The only place it was accessed was in tests. Many of them have another
      way that they can test their behavior, that doesn't involve reaching
      into internals as far as they did. `AssociationScopeTest` is testing a
      situation where the where clause would have one bind param per
      predicate, so it can just ignore the predicates entirely. The where
      chain test was primarly duplicating the logic tested on `WhereClause`
      directly, so I instead just make sure it calls the appropriate method
      which is fully tested in isolation.
      d26dd008
  28. 26 1月, 2015 1 次提交
  29. 14 11月, 2014 1 次提交
  30. 24 10月, 2014 1 次提交
  31. 04 9月, 2014 1 次提交
    • G
      Enums shouldn't ruin people's anniversaries · 94b7328b
      Godfrey Chan 提交于
      Added a few more methods on Module/Class to the dangerous class methods
      blacklist. (Technically, allocate and new are already protected currently because
      we happen to redefine them in the current implantation.)
      
      Closes #16792
      94b7328b
  32. 21 5月, 2014 1 次提交
  33. 24 4月, 2014 1 次提交
    • J
      Fixes Issue #13466. · 9c3afdc3
      Jefferson Lai 提交于
      Changed the call to a scope block to be evaluated with instance_eval.
      The result is that ScopeRegistry can use the actual class instead of base_class when
      caching scopes so queries made by classes with a common ancestor won't leak scopes.
      9c3afdc3