Class: ActiveRecord::Relation

Inherits:
Object
  • Object
show all
Defined in:
lib/rmtools/active_record/base.rb

Instance Method Summary collapse

Instance Method Details

#any?Boolean

Returns:

  • (Boolean)


197
198
199
# File 'lib/rmtools/active_record/base.rb', line 197

def any?
  limit(1).count != 0
end

#empty?Boolean

Returns:

  • (Boolean)


201
202
203
# File 'lib/rmtools/active_record/base.rb', line 201

def empty?
  limit(1).count == 0
end