From 35cc32841ed343e3013cdf67e7330647d50d668b Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Fri, 10 Jan 2014 09:59:19 +0100 Subject: [PATCH] doc, API example on how to use `Model#exists?` with multiple IDs. [ci skip] Refs #13658 --- activerecord/lib/active_record/relation/finder_methods.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 3963f2b3e0..4984dbd277 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -195,6 +195,7 @@ def last! # Person.exists?(5) # Person.exists?('5') # Person.exists?(['name LIKE ?', "%#{query}%"]) + # Person.exists?(id: [1, 4, 8]) # Person.exists?(name: 'David') # Person.exists?(false) # Person.exists? -- GitLab