aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-04-06 20:10:44 +0000
committerRick Olson <technoweenie@gmail.com>2006-04-06 20:10:44 +0000
commit9466211d42ce7ecd921ef6804e77d199e1677d89 (patch)
tree4e36b50320e64360cfc9b2b0c4fbfa88abb4e400 /activerecord/lib/active_record
parent496725022a09cd2100e1550745064fb5a6308ee4 (diff)
downloadrails-9466211d42ce7ecd921ef6804e77d199e1677d89.tar.gz
rails-9466211d42ce7ecd921ef6804e77d199e1677d89.tar.bz2
rails-9466211d42ce7ecd921ef6804e77d199e1677d89.zip
fix calculations for the Oracle Adapter (closes #4626) [Michael Schoen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/calculations.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/calculations.rb b/activerecord/lib/active_record/calculations.rb
index b62d205201..d586bec8e6 100644
--- a/activerecord/lib/active_record/calculations.rb
+++ b/activerecord/lib/active_record/calculations.rb
@@ -145,7 +145,7 @@ module ActiveRecord
protected
def construct_calculation_sql(aggregate, aggregate_alias, options) #:nodoc:
scope = scope(:find)
- sql = ["SELECT #{aggregate} AS #{aggregate_alias}"]
+ sql = "SELECT #{aggregate} AS #{aggregate_alias}"
sql << ", #{options[:group_field]} AS #{options[:group_alias]}" if options[:group]
sql << " FROM #{table_name} "
add_joins!(sql, options, scope)
@@ -154,7 +154,7 @@ module ActiveRecord
sql << " HAVING #{options[:having]}" if options[:group] && options[:having]
sql << " ORDER BY #{options[:order]}" if options[:order]
add_limit!(sql, options)
- sql.join
+ sql
end
def execute_simple_calculation(operation, column_name, column, aggregate, aggregate_alias, options) #:nodoc: