Permalink
Browse files

Remove the .to_s fix in validates_uniqueness_of, as Chars get quoted …

…correctly.
  • Loading branch information...
1 parent babbc15 commit 095ad690f3fb6df4e89446dd40e03cf2c204e42a @NZKoz NZKoz committed Sep 11, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/validations.rb
@@ -665,7 +665,7 @@ def validates_uniqueness_of(*attr_names)
condition_params = [value]
else
condition_sql = "LOWER(#{sql_attribute}) #{comparison_operator}"
- condition_params = [value.chars.downcase.to_s]
+ condition_params = [value.chars.downcase]
end
if scope = configuration[:scope]

0 comments on commit 095ad69

Please sign in to comment.