aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-04-05 03:52:58 +0000
committerPratik Naik <pratiknaik@gmail.com>2008-04-05 03:52:58 +0000
commitaa4af60aad5772458e8ba3bd08505781aeeb53a2 (patch)
tree22eadb1dc551f95e3150f803dc654eaa125544d9 /activerecord/lib/active_record/base.rb
parent08318b8bcd32bae741e672899a33c6a7d52664c8 (diff)
downloadrails-aa4af60aad5772458e8ba3bd08505781aeeb53a2.tar.gz
rails-aa4af60aad5772458e8ba3bd08505781aeeb53a2.tar.bz2
rails-aa4af60aad5772458e8ba3bd08505781aeeb53a2.zip
Improve documentation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index fe38454226..92417a429f 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -191,6 +191,10 @@ module ActiveRecord #:nodoc:
#
# Student.find(:all, :conditions => { :grade => 9..12 })
#
+ # An array may be used in the hash to use the SQL IN operator:
+ #
+ # Student.find(:all, :conditions => { :grade => [9,11,12] })
+ #
# == Overwriting default accessors
#
# All column values are automatically available through basic accessors on the Active Record object, but sometimes you
@@ -488,6 +492,7 @@ module ActiveRecord #:nodoc:
# Examples for find all:
# Person.find(:all) # returns an array of objects for all the rows fetched by SELECT * FROM people
# Person.find(:all, :conditions => [ "category IN (?)", categories], :limit => 50)
+ # Person.find(:all, :conditions => { :friends => ["Bob", "Steve", "Fred"] }
# Person.find(:all, :offset => 10, :limit => 10)
# Person.find(:all, :include => [ :account, :friends ])
# Person.find(:all, :group => "category")