diff options
author | José Valim <jose.valim@gmail.com> | 2012-01-06 09:03:09 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-01-06 09:03:24 +0100 |
commit | 705b29bcb15f940294f17645ad91c02731f6861a (patch) | |
tree | e7e27590bb1d6098bc15fd296a8e237a9f61f8df /activerecord/lib | |
parent | 291ad6318fdd028292d47d05a99fdc059e3b2bfc (diff) | |
download | rails-705b29bcb15f940294f17645ad91c02731f6861a.tar.gz rails-705b29bcb15f940294f17645ad91c02731f6861a.tar.bz2 rails-705b29bcb15f940294f17645ad91c02731f6861a.zip |
Revert "Merge pull request #2325 from pyromaniac/master"
It breaks the build for mysql.
This reverts commit 958d25df4a1b0d41ce5deeeb0739c93b49bbd18d, reversing
changes made to 8f309e31057e1b26fefedb199ab0526126fb1fe4.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/validations/uniqueness.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/validations/uniqueness.rb b/activerecord/lib/active_record/validations/uniqueness.rb index cbeb95718c..8abe001775 100644 --- a/activerecord/lib/active_record/validations/uniqueness.rb +++ b/activerecord/lib/active_record/validations/uniqueness.rb @@ -52,7 +52,7 @@ module ActiveRecord def build_relation(klass, table, attribute, value) #:nodoc: column = klass.columns_hash[attribute.to_s] - value = column.limit ? value.to_s[0, column.limit] : value.to_s if value && column.text? + value = column.limit ? value.to_s[0, column.limit] : value.to_s if column.text? if !options[:case_sensitive] && value && column.text? # will use SQL LOWER function before comparison, unless it detects a case insensitive collation |