Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4192

Show
Ignore:
Timestamp:
04/06/06 20:10:44 (3 years ago)
Author:
rick
Message:

fix calculations for the Oracle Adapter (closes #4626) [Michael Schoen]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/lib/active_record/calculations.rb

    r4185 r4192  
    146146        def construct_calculation_sql(aggregate, aggregate_alias, options) #:nodoc: 
    147147          scope = scope(:find) 
    148           sql  = ["SELECT #{aggregate} AS #{aggregate_alias}"] 
     148          sql  = "SELECT #{aggregate} AS #{aggregate_alias}" 
    149149          sql << ", #{options[:group_field]} AS #{options[:group_alias]}" if options[:group] 
    150150          sql << " FROM #{table_name} " 
     
    155155          sql << " ORDER BY #{options[:order]}" if options[:order] 
    156156          add_limit!(sql, options) 
    157           sql.join 
     157          sql 
    158158        end 
    159159