Skip to content
  • Jonathan Hefner's avatar
    843283b4
    Add negative `where` examples for `normalizes` · 843283b4
    Jonathan Hefner authored
    In #49105, `where` examples were added to the `normalizes` documentation
    to demonstrate that normalizations are also applied for `where`.
    However, as with the `exists?` examples, we should also demonstrate that
    normalizations are only applied to keyword arguments, not positional
    arguments.  We can also address the original source of the confusion by
    changing the wording of "finder methods" to "query methods".
    
    This commit also removes the tests added in #49105.  `normalizes` works
    at the level of attribute types, so there is no need to test every query
    method.  Testing `find_by` is sufficient.  (And, in point of fact,
    `find_by` is implemented in terms of `where`.)
    843283b4
    Add negative `where` examples for `normalizes`
    Jonathan Hefner authored
    In #49105, `where` examples were added to the `normalizes` documentation
    to demonstrate that normalizations are also applied for `where`.
    However, as with the `exists?` examples, we should also demonstrate that
    normalizations are only applied to keyword arguments, not positional
    arguments.  We can also address the original source of the confusion by
    changing the wording of "finder methods" to "query methods".
    
    This commit also removes the tests added in #49105.  `normalizes` works
    at the level of attribute types, so there is no need to test every query
    method.  Testing `find_by` is sufficient.  (And, in point of fact,
    `find_by` is implemented in terms of `where`.)
Loading