1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activemodel/lib
Eugene Kenny d2e2ca0d0f Always load validator class to verify it exists
When updating our app for 9def05385f, I
found several incorrectly configured validations that looked like this:

    validates :name, uniqueness: true, case_sensitive: false

The intent is clearly for `case_sensitive: false` to be passed as an
option to the uniqueness validator, but instead it's being passed as
its own separate validation. Because the value `false` disables the
validation, the validator class isn't loaded and the failure is silent.

The validator should always be loaded, even if it's disabled, to ensure
it exists and avoid configuration errors like the one described above.
2019-08-26 11:52:34 +01:00
..
active_model Always load validator class to verify it exists 2019-08-26 11:52:34 +01:00
active_model.rb Move the ActiveModel:Errors#full_message method to the Error class: 2019-07-16 14:28:38 +02:00