1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/active_record/validations
Ryuta Kamizono 7ae406a810 Allow attribute aliases for validates_uniqueness_of
For now, the target attribute allows attribute aliases, but `:scope`'s
attribute does not, the cause is that the former use
`read_attribute_for_validation`, but the latter does not.

Unfortunately we cannot use `read_attribute_for_validation` in this
case, it intentionally bypass custom attribute getter to allow #7072.

To work both alias and #7072, `read_attribute` should be used to resolve
attribute aliases.
2020-06-01 22:44:39 +09:00
..
absence.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
associated.rb Fix keyword arguments warnings 2019-09-11 10:48:29 +09:00
length.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
numericality.rb Add scale support to ActiveRecord::Validations::NumericalityValidator 2020-01-13 11:00:22 -05:00
presence.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
uniqueness.rb Allow attribute aliases for validates_uniqueness_of 2020-06-01 22:44:39 +09:00