diff options
author | Clemens Kofler <clemens@railway.at> | 2008-09-02 10:54:58 +0200 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-09-03 00:55:23 +0200 |
commit | a377c9853c05904f76751f48d2d56ef564da51b0 (patch) | |
tree | 2ce46d9f97963e2be13e088380ae083897509d08 /activemodel/lib | |
parent | b42f53ca1fa0af0fd9cc37e2765cd9c47b100065 (diff) | |
download | rails-a377c9853c05904f76751f48d2d56ef564da51b0.tar.gz rails-a377c9853c05904f76751f48d2d56ef564da51b0.tar.bz2 rails-a377c9853c05904f76751f48d2d56ef564da51b0.zip |
Some performance goodness for AM Validations.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/validations/uniqueness.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations/uniqueness.rb b/activemodel/lib/active_model/validations/uniqueness.rb index 2b47c6bc09..5075951636 100644 --- a/activemodel/lib/active_model/validations/uniqueness.rb +++ b/activemodel/lib/active_model/validations/uniqueness.rb @@ -79,8 +79,8 @@ module ActiveModel 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] ) ) |