diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-11 10:02:39 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-11 10:02:39 -0700 |
commit | c4fc3963003f53cb963435ea3733bd3e8164c803 (patch) | |
tree | 3201c98433c4d98806103acaa42abb571a087c2b /activerecord/lib/active_record/validations | |
parent | 35b2715456999662cc34390e258962738aaa8dc7 (diff) | |
download | rails-c4fc3963003f53cb963435ea3733bd3e8164c803.tar.gz rails-c4fc3963003f53cb963435ea3733bd3e8164c803.tar.bz2 rails-c4fc3963003f53cb963435ea3733bd3e8164c803.zip |
adding a case_sensitive_modifier for forcing comparisons to be case sensitive
Diffstat (limited to 'activerecord/lib/active_record/validations')
-rw-r--r-- | activerecord/lib/active_record/validations/uniqueness.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/validations/uniqueness.rb b/activerecord/lib/active_record/validations/uniqueness.rb index 37381d063d..d1225a9ed9 100644 --- a/activerecord/lib/active_record/validations/uniqueness.rb +++ b/activerecord/lib/active_record/validations/uniqueness.rb @@ -59,6 +59,7 @@ module ActiveRecord if !options[:case_sensitive] && column.text? relation = table[attribute].matches(value) else + value = klass.connection.case_sensitive_modifier(value) relation = table[attribute].eq(value) end |