Permalink
Browse files

Some performance goodness for AM Validations.

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent b42f53c commit a377c9853c05904f76751f48d2d56ef564da51b0 @clemens clemens committed with jeremy Sep 2, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 activemodel/lib/active_model/validations/uniqueness.rb
@@ -79,8 +79,8 @@ def validates_uniqueness_of(*attr_names)
results = finder_class.with_exclusive_scope do
connection.select_all(
construct_finder_sql(
- :select => "#{attr_name}",
- :from => "#{finder_class.quoted_table_name}",
+ :select => attr_name,
+ :from => finder_class.quoted_table_name,
:conditions => [condition_sql, *condition_params]
)
)

0 comments on commit a377c98

Please sign in to comment.