Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix calculation tests on sqlite2 [#3053 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
commit cb3e669b0df3a962a82b9c47933d65b1a24762b8 1 parent 76335c2
Jay Pignata authored jeremy committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/calculations.rb
View
2  activerecord/lib/active_record/calculations.rb
@@ -197,7 +197,7 @@ def construct_calculation_sql(operation, column_name, options) #:nodoc:
sql << ", #{options[:group_field]} AS #{options[:group_alias]}" if options[:group]
if options[:from]
sql << " FROM #{options[:from]} "
- elsif scope && scope[:from]
+ elsif scope && scope[:from] && !use_workaround
sql << " FROM #{scope[:from]} "
else
sql << " FROM (SELECT #{distinct}#{column_name}" if use_workaround
Please sign in to comment.
Something went wrong with that request. Please try again.