aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-17 02:59:42 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-17 03:00:56 +0530
commitcd90dcb1bde5c411a55bcec97597a8fe22b56a5d (patch)
tree41d3c22a8c81d8bdbb4d79749aea495e1bc0a7aa /activerecord/lib/active_record/relation
parente9a1dbe79a6610793a71af227aaf64ff55554cad (diff)
downloadrails-cd90dcb1bde5c411a55bcec97597a8fe22b56a5d.tar.gz
rails-cd90dcb1bde5c411a55bcec97597a8fe22b56a5d.tar.bz2
rails-cd90dcb1bde5c411a55bcec97597a8fe22b56a5d.zip
Rename Model.active_relation to Model.unscoped
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r--activerecord/lib/active_record/relation/calculation_methods.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/calculation_methods.rb b/activerecord/lib/active_record/relation/calculation_methods.rb
index 2477481ec8..91de89e607 100644
--- a/activerecord/lib/active_record/relation/calculation_methods.rb
+++ b/activerecord/lib/active_record/relation/calculation_methods.rb
@@ -53,7 +53,7 @@ module ActiveRecord
def execute_simple_calculation(operation, column_name, distinct) #:nodoc:
column = if @klass.column_names.include?(column_name.to_s)
- Arel::Attribute.new(@klass.active_relation, column_name)
+ Arel::Attribute.new(@klass.unscoped, column_name)
else
Arel::SqlLiteral.new(column_name == :all ? "*" : column_name.to_s)
end
@@ -77,7 +77,7 @@ module ActiveRecord
select_statement = if operation == 'count' && column_name == :all
"COUNT(*) AS count_all"
else
- Arel::Attribute.new(@klass.active_relation, column_name).send(operation).as(aggregate_alias).to_sql
+ Arel::Attribute.new(@klass.unscoped, column_name).send(operation).as(aggregate_alias).to_sql
end
select_statement << ", #{group_field} AS #{group_alias}"