1. 26 2月, 2017 1 次提交
  2. 31 1月, 2017 1 次提交
  3. 04 1月, 2017 1 次提交
  4. 30 12月, 2016 1 次提交
  5. 29 12月, 2016 1 次提交
  6. 24 12月, 2016 1 次提交
  7. 06 12月, 2016 1 次提交
  8. 24 11月, 2016 1 次提交
    • D
      Restore RecordNotFound when *_ids= can't find records by ID · 15e2da65
      Dominic Cleal 提交于
      9c9fb19b changed the behaviour of the _ids= setters for associations to
      raise an AssociationTypeMismatch when unknown IDs are given:
      
          Class: <ActiveRecord::AssociationTypeMismatch>
          Message: <"Developer(#43811860) expected, got NilClass(#16732720)">
      
      This restores the original ActiveRecord::RecordNotFound exception with a
      much clearer error message:
      
          Class: <ActiveRecord::RecordNotFound>
          Message: <"Couldn't find all Developers with 'id': (1, -9999) [WHERE \"contracts\".\"company_id\" = ?] (found 1 results, but was looking for 2)">
      
      Fixes #25719
      15e2da65
  9. 09 11月, 2016 1 次提交
    • R
      Should except `:distinct` rather than `:order` for `exists?` · 2bf7c300
      Ryuta Kamizono 提交于
      Records fetching order is very important for performance if `limit` is
      presented. Should not except the order in the case.
      
      And `exists?` replaces select list to `1 AS one` therefore `:distinct`
      is useless (`DISTINCT 1 AS one`). And PostgreSQL raises the following
      error if `:distinct` and `:order` are used in the same time.
      
      ```
      ERROR:  for SELECT DISTINCT, ORDER BY expressions must appear in select list
      ```
      2bf7c300
  10. 23 9月, 2016 1 次提交
  11. 03 9月, 2016 1 次提交
  12. 18 8月, 2016 1 次提交
  13. 16 8月, 2016 2 次提交
  14. 15 8月, 2016 1 次提交
  15. 14 8月, 2016 1 次提交
  16. 08 8月, 2016 1 次提交
  17. 07 8月, 2016 2 次提交
  18. 28 7月, 2016 1 次提交
  19. 16 6月, 2016 1 次提交
    • R
      Prevent `RangeError` for `FinderMethods#exists?` · 1cf467b7
      Ryuta Kamizono 提交于
      `FinderMethods#exists?` should return a boolean rather than raising an
      exception.
      
      `UniquenessValidator#build_relation` catches a `RangeError` because it
      includes type casting due to a string value truncation. But a string
      value truncation was removed at #23523 then type casting in
      `build_relation` is no longer necessary. aa062318 removes type casting in
      `build_relation` then a `RangeError` moves to `relation.exists?`.
      
      This change will remove the catching a `RangeError`.
      1cf467b7
  20. 13 6月, 2016 1 次提交
  21. 31 5月, 2016 1 次提交
    • S
      Exists shouldn't error when used with `includes` · 02da8aea
      Sean Griffin 提交于
      Currently `exists?` does some hackery where it assumes that we can join
      onto anything that we passed to `eager_load` or `includes`, which
      doesn't work if we are joining onto a polymorphic association.
      
      Actually figuring out if we want to include something would require
      knowledge deep within the join dependency module, which is hard to pull
      up. The simplest solution is just to pass a flag down that says we're
      not actually going to try to eager load any of the data. It's not the
      solution I'd like, but that code really needs to be untangled before we
      can do much with it.
      
      This is another attempt at 6d5b1fdf which should address the concerns
      that led to reverting it in 4ecabed2.
      02da8aea
  22. 12 4月, 2016 1 次提交
  23. 14 3月, 2016 1 次提交
  24. 28 2月, 2016 3 次提交
  25. 21 2月, 2016 1 次提交
  26. 14 2月, 2016 1 次提交
  27. 13 2月, 2016 2 次提交
  28. 11 2月, 2016 2 次提交
    • Y
      remove warnings from FinderMethods · 424b2019
      yuuji.yaginuma 提交于
      This removes the following warnings.
      
      ```
      activerecord/lib/active_record/relation/finder_methods.rb:252: warning: ambiguous first argument; put parentheses or a space even after `-' operator
      activerecord/lib/active_record/relation/finder_methods.rb:258: warning: ambiguous first argument; put parentheses or a space even after `-' operator
      activerecord/lib/active_record/relation/finder_methods.rb:268: warning: ambiguous first argument; put parentheses or a space even after `-' operator
      activerecord/lib/active_record/relation/finder_methods.rb:274: warning: ambiguous first argument; put parentheses or a space even after `-' operator
      ```
      424b2019
    • B
      rename to 'second_to_last' and 'third_to_last' · e8aeda2a
      Brian Christian 提交于
      e8aeda2a
  29. 10 2月, 2016 1 次提交
  30. 04 2月, 2016 2 次提交
  31. 02 2月, 2016 1 次提交
  32. 28 1月, 2016 2 次提交