提交 a377c985 编写于 作者: C Clemens Kofler 提交者: Jeremy Kemper

Some performance goodness for AM Validations.

Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
上级 b42f53ca
......@@ -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]
)
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册