diff options
author | Eugene Pimenov <libc@mac.com> | 2008-08-29 14:36:00 +0400 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-08-29 20:24:20 +0200 |
commit | 743f0e7114b071bf7786a80227c12dcc7ccee6c1 (patch) | |
tree | 54ac538042ba3e6caa556bec65f42a4c20385cd4 /activerecord/lib | |
parent | a9086b3daa0a5174ba2118a2131eb5121f32d41b (diff) | |
download | rails-743f0e7114b071bf7786a80227c12dcc7ccee6c1.tar.gz rails-743f0e7114b071bf7786a80227c12dcc7ccee6c1.tar.bz2 rails-743f0e7114b071bf7786a80227c12dcc7ccee6c1.zip |
Make case insensitive validates_uniqueness_of use unicode aware downcase method.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/validations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 8fe4336bbc..9ee80e6655 100644 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -664,7 +664,7 @@ module ActiveRecord condition_params = [value] else condition_sql = "LOWER(#{sql_attribute}) #{comparison_operator}" - condition_params = [value.downcase] + condition_params = [value.chars.downcase] end if scope = configuration[:scope] |