Method: ActiveRecord::Relation#many?

Defined in:
lib/active_record/relation.rb

#many?Boolean

Returns true if there is more than one record.

Returns:

  • (Boolean)


334
335
336
337
338
339
340
# File 'lib/active_record/relation.rb', line 334

def many?
  return false if @none

  return super if block_given?
  return records.many? if loaded?
  limited_count > 1
end