instance method
any?
Ruby on Rails 4.1.16
Since v3.0.20Signature
any?()
Returns true if there are any records.
Source
# File activerecord/lib/active_record/relation.rb, line 263
def any?
if block_given?
to_a.any? { |*block_args| yield(*block_args) }
else
!empty?
end
end
Defined in activerecord/lib/active_record/relation.rb line 263
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Relation