diff options
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/validations.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 606362eacd..7d77f35a7a 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -533,8 +533,8 @@ module ActiveRecord condition_sql = "#{record.class.table_name}.#{attr_name} #{attribute_condition(value)}" condition_params = [value] else - condition_sql = "UPPER(#{record.class.table_name}.#{attr_name}) #{attribute_condition(value)}" - condition_params = [value.upcase] + condition_sql = "LOWER(#{record.class.table_name}.#{attr_name}) #{attribute_condition(value)}" + condition_params = [value.downcase] end if scope = configuration[:scope] Array(scope).map do |scope_item| |