aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-12-27 18:32:10 +0530
committerPratik Naik <pratiknaik@gmail.com>2009-12-27 18:32:10 +0530
commit8957f5db5d543b465af2ec55339628476ed17dc2 (patch)
tree2196882ac9715b2a17497cc13160d9963b3663c3 /activerecord/lib/active_record/base.rb
parentd6d0fe8c8f68529404d8186634f1f7b5f6f4b32c (diff)
downloadrails-8957f5db5d543b465af2ec55339628476ed17dc2.tar.gz
rails-8957f5db5d543b465af2ec55339628476ed17dc2.tar.bz2
rails-8957f5db5d543b465af2ec55339628476ed17dc2.zip
Make Model.all just a wrapper for find(:all)
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 0766dfe752..ed031088a7 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -669,16 +669,10 @@ module ActiveRecord #:nodoc:
find(:last, *args)
end
- # Returns an ActiveRecord::Relation object. You can pass in all the same arguments to this method as you can
- # to find(:all).
+ # A convenience wrapper for <tt>find(:all, *args)</tt>. You can pass in all the
+ # same arguments to this method as you can to <tt>find(:all)</tt>.
def all(*args)
- options = args.extract_options!
-
- if options.empty? && !scoped?(:find)
- arel_table.to_a
- else
- construct_finder_arel_with_includes(options).to_a
- end
+ find(:all, *args)
end
# Executes a custom SQL query against your database and returns all the results. The results will