method
include?
v7.0.0 -
Show latest stable
- Class:
ActiveRecord::FinderMethods
include?(record)public
Returns true if the relation contains the given record or false otherwise.
No query is performed if the relation is loaded; the given record is compared to the records in memory. If the relation is unloaded, an efficient existence query is performed, as in #exists?.