Permalink
Browse files

Fix uniqueness validation: with_exclusive_scope is not public

  • Loading branch information...
1 parent d927265 commit 1b91f534ce91ff5d0a4d39d96a8f19b58022d403 @jeremy jeremy committed Dec 28, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/validations/uniqueness.rb
View
2 activerecord/lib/active_record/validations/uniqueness.rb
@@ -22,7 +22,7 @@ def validate_each(record, attribute, value)
params << record.send(:id)
end
- finder_class.with_exclusive_scope do
+ finder_class.send(:with_exclusive_scope) do
if finder_class.exists?([sql, *params])
record.errors.add(attribute, :taken, :default => options[:message], :value => value)
end

0 comments on commit 1b91f53

Please sign in to comment.