1. 12 7月, 2016 1 次提交
  2. 11 7月, 2016 1 次提交
    • S
      Always prefer class types to query types when casting `group` · a45363a2
      Sean Griffin 提交于
      When `group` is used in combination with any calculation method, the
      resulting hash uses the grouping expression as the key. Currently we're
      incorrectly always favoring the type reported by the query, instead of
      the type known by the class. This causes differing behavior depending on
      whether the adaptor actually gives proper types with the query or not.
      After this change, the behavior will be the same on all adaptors -- we
      see if we know the type from the class, fall back to the type from the
      query, and finally fall back to the identity type.
      
      Fixes #25595
      a45363a2
  3. 09 7月, 2016 1 次提交
    • R
      fix to_param to maximize content · 3b49d792
      Rob Biedenharn 提交于
      The documentation states that parameter values longer than 20 characters
      will be truncated by words, but the example shows that a parameter based
      on "David Heinemeier Hansson" (with id: 125) becomes "125-david" when
      "David Heinemeier".length == 16 so why so short?
      
      The answer lies in the use of the #truncate option omission: nil which
      seems to have been intended to mean "nothing", but which actually causes
      the default string "..." to be used. This causes #truncate to cleave
      words until the "..." can be added and still remain within the requested
      size of 20 characters.
      
      The better option is omission: '' (which is probably what was originally
      intended).
      
      Furthermore, since the use of #parameterize will remove non-alphanumeric
      characters, we can maximize the useful content of the output by calling
      parameterize first and then giving truncate a separator: /-/ rather than
      a space.
      3b49d792
  4. 08 7月, 2016 1 次提交
  5. 06 7月, 2016 5 次提交
  6. 04 7月, 2016 3 次提交
  7. 03 7月, 2016 2 次提交
    • W
      Clarify Postgres initials. [skip ci] · b7f4b8e0
      William Johnston 提交于
      b7f4b8e0
    • B
      Improve error message when record touch fails. · ac156060
      Ben Standefer 提交于
      The current error message only indicates that a touch can fail because the record is new. In practice, we saw cases where touches were failing because the record had been destroyed. `persisted?` checks `new_record?` *and* `destroyed?`. It was confusing to get a message about a new record when in reality we were destroying records.
      
      I also included a helpful tip for users to consider using `persisted?`, `new_record?`, or `destroyed?` before touching.
      ac156060
  8. 02 7月, 2016 3 次提交
  9. 01 7月, 2016 1 次提交
  10. 29 6月, 2016 3 次提交
  11. 27 6月, 2016 1 次提交
  12. 25 6月, 2016 3 次提交
  13. 24 6月, 2016 4 次提交
  14. 23 6月, 2016 1 次提交
  15. 22 6月, 2016 1 次提交
  16. 20 6月, 2016 1 次提交
  17. 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
  18. 15 6月, 2016 1 次提交
  19. 14 6月, 2016 1 次提交
  20. 13 6月, 2016 1 次提交
  21. 12 6月, 2016 1 次提交
  22. 11 6月, 2016 1 次提交
  23. 10 6月, 2016 1 次提交
  24. 08 6月, 2016 1 次提交