Skip to content

Commit

Permalink
Fix calculation tests on sqlite2 [#3053 state:resolved]
Browse files Browse the repository at this point in the history
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information
Jay Pignata authored and jeremy committed Aug 16, 2009
1 parent 76335c2 commit cb3e669
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/calculations.rb
Expand Up @@ -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
Expand Down

0 comments on commit cb3e669

Please sign in to comment.