Merge commit 'rails/master'

This commit is contained in:
Jeremy Kemper
2008-04-20 16:50:41 -07:00
2 changed files with 2 additions and 2 deletions

View File

@@ -178,7 +178,7 @@ module ActiveRecord
sql = "SELECT COUNT(*) AS #{aggregate_alias}" if use_workaround
sql << ", #{options[:group_field]} AS #{options[:group_alias]}" if options[:group]
sql << " FROM (SELECT DISTINCT #{column_name}" if use_workaround
sql << " FROM (SELECT #{distinct}#{column_name}" if use_workaround
sql << " FROM #{connection.quote_table_name(table_name)} "
if merged_includes.any?
join_dependency = ActiveRecord::Associations::ClassMethods::JoinDependency.new(self, merged_includes, options[:joins])

View File

@@ -257,7 +257,7 @@ module ActiveRecord
record = {}
row.each_key do |key|
if key.is_a?(String)
record[key.sub(/^\w+\./, '')] = row[key]
record[key.sub(/^"?\w+"?\./, '')] = row[key]
end
end
record