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)


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

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

#empty?Boolean

Returns:

  • (Boolean)


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

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