aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorClemens Kofler <clemens@railway.at>2008-09-02 10:54:58 +0200
committerJeremy Kemper <jeremy@bitsweat.net>2008-09-03 00:55:23 +0200
commita377c9853c05904f76751f48d2d56ef564da51b0 (patch)
tree2ce46d9f97963e2be13e088380ae083897509d08 /activemodel/lib
parentb42f53ca1fa0af0fd9cc37e2765cd9c47b100065 (diff)
downloadrails-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.rb4
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]
)
)