aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@envy8.local>2008-04-28 13:27:52 -0500
committerDavid Heinemeier Hansson <david@envy8.local>2008-04-28 13:27:52 -0500
commit0a6980f2dc6ef8b211323e0655f41702a4ce3eae (patch)
tree8160d06eb90fc794449d8e78a5b280b4136dc4bd /activerecord/lib/active_record/base.rb
parent850aba5473ce14edcd067f16badfa198e2070095 (diff)
downloadrails-0a6980f2dc6ef8b211323e0655f41702a4ce3eae.tar.gz
rails-0a6980f2dc6ef8b211323e0655f41702a4ce3eae.tar.bz2
rails-0a6980f2dc6ef8b211323e0655f41702a4ce3eae.zip
Let Base.all use conditions etc like first/last
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index dfc0eac54d..300688453a 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -532,6 +532,12 @@ module ActiveRecord #:nodoc:
find(:last, *args)
end
+ # This is an alias for find(:all). You can pass in all the same arguments to this method as you can
+ # to find(:all)
+ def all(*args)
+ find(:all, *args)
+ end
+
#
# Executes a custom sql query against your database and returns all the results. The results will
# be returned as an array with columns requested encapsulated as attributes of the model you call