1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases/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_validation_test.rb Module#{attr,attr_accessor,attr_reader,attr_writer} become public since Ruby 2.5 2018-12-21 02:05:27 +09:00
association_validation_test.rb
i18n_generate_message_validation_test.rb Fall back to parent locale before it falls back to the :errors namespace 2019-03-04 16:54:06 -05:00
i18n_validation_test.rb Move the ActiveModel:Errors#full_message method to the Error class: 2019-07-16 14:28:38 +02:00
length_validation_test.rb Module#{attr,attr_accessor,attr_reader,attr_writer} become public since Ruby 2.5 2018-12-21 02:05:27 +09:00
numericality_validation_test.rb Add scale support to ActiveRecord::Validations::NumericalityValidator 2020-01-13 11:00:22 -05:00
presence_validation_test.rb Module#{attr,attr_accessor,attr_reader,attr_writer} become public since Ruby 2.5 2018-12-21 02:05:27 +09:00
uniqueness_validation_test.rb Allow attribute aliases for validates_uniqueness_of 2020-06-01 22:44:39 +09:00