aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-12-27 15:06:45 +0530
committerPratik Naik <pratiknaik@gmail.com>2009-12-27 15:06:45 +0530
commit81608cf8fa61973d65f24efbc4ae4931016888e7 (patch)
treeb4ae5cb3ea565b606de32b6cfb77f0f91dd6436f /activerecord/lib
parent1efc8edb5f8799c48ba1992e07a8566bb12b7224 (diff)
downloadrails-81608cf8fa61973d65f24efbc4ae4931016888e7.tar.gz
rails-81608cf8fa61973d65f24efbc4ae4931016888e7.tar.bz2
rails-81608cf8fa61973d65f24efbc4ae4931016888e7.zip
Make Model.all return an array rather than a relation for consistency. Use Model.scoped to get a relation
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-xactiverecord/lib/active_record/base.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index e619e41329..2008dea5e9 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -671,9 +671,9 @@ module ActiveRecord #:nodoc:
options = args.extract_options!
if options.empty? && !scoped?(:find)
- arel_table
+ arel_table.to_a
else
- construct_finder_arel_with_includes(options)
+ construct_finder_arel_with_includes(options).to_a
end
end