aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/finder_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-05-02 05:34:27 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-05-02 05:34:27 +0000
commit5f77f64e924e0e40f5f141dd38df5d54335b7a46 (patch)
treed80737b3e0f7f98b58dc1cdad9b8c59232f81521 /activerecord/test/finder_test.rb
parenta080b1a231ba26e3d74fd1770abc97068a9d7095 (diff)
downloadrails-5f77f64e924e0e40f5f141dd38df5d54335b7a46.tar.gz
rails-5f77f64e924e0e40f5f141dd38df5d54335b7a46.tar.bz2
rails-5f77f64e924e0e40f5f141dd38df5d54335b7a46.zip
Added option for passing an array to the find_all version of the dynamic finders and have it evaluated as an IN fragment
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1266 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/finder_test.rb')
-rw-r--r--activerecord/test/finder_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb
index 0c672c2e35..3748e26f5e 100644
--- a/activerecord/test/finder_test.rb
+++ b/activerecord/test/finder_test.rb
@@ -211,6 +211,10 @@ class FinderTest < Test::Unit::TestCase
assert @topics["first"].find, topics.first
end
+ def test_find_all_by_array_attribute
+ assert_equal 2, Topic.find_all_by_title(["The First Topic", "The Second Topic's of the day"]).size
+ end
+
def test_find_all_by_boolean_attribute
topics = Topic.find_all_by_approved(false)
assert_equal 1, topics.size