rails/activemodel/test
Jonathan Hefner 5389c56292 Dup options in validates_with
Some validators, such as validators that inherit from `EachValidator`,
mutate the options they receive.  This can cause problems when passing
multiple validators and options to `validates_with`.  This can also be a
problem if a validator deletes standard options such as `:if` and `:on`,
because the validation callback would then not receive them.

This commit modifies `validates_with` to `dup` options before passing
them to validators, thus preventing these issues.

Fixes #44460.
Closes #44476.

Co-authored-by: Dieter Späth <dieter.spaeth@lanes-planes.com>
2022-05-26 15:08:00 -05:00
..
cases Dup options in validates_with 2022-05-26 15:08:00 -05:00
models Add beginless range support to clusivity 2022-05-20 07:46:01 +10:00
validators Revert "Merge pull request #37504 from utilum/no_implicit_conversion_of_nil" 2019-12-09 11:50:39 -03:00