diff options
author | Jay Pignata <john.pignata@gmail.com> | 2009-08-14 23:54:37 -0400 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-08-15 19:14:11 -0700 |
commit | cb3e669b0df3a962a82b9c47933d65b1a24762b8 (patch) | |
tree | daae02bcfa3433d4acf885f76af4f9eb1f04f2da | |
parent | 76335c27b6ddbd0fb17ead70dac4878c629834c5 (diff) | |
download | rails-cb3e669b0df3a962a82b9c47933d65b1a24762b8.tar.gz rails-cb3e669b0df3a962a82b9c47933d65b1a24762b8.tar.bz2 rails-cb3e669b0df3a962a82b9c47933d65b1a24762b8.zip |
Fix calculation tests on sqlite2 [#3053 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
-rw-r--r-- | activerecord/lib/active_record/calculations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/calculations.rb b/activerecord/lib/active_record/calculations.rb index 4a88c43dff..646fed1a0b 100644 --- a/activerecord/lib/active_record/calculations.rb +++ b/activerecord/lib/active_record/calculations.rb @@ -197,7 +197,7 @@ module ActiveRecord 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 |