Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
present test
ActiveRecord::Base.logger = Logger.new(STDOUT)
MODEL = User # enter a model that exists in your app here
users = MODEL.all
puts "users.present?"
users.present?
users = nil
users = MODEL.all
puts "users.empty?"
users.empty?
users = nil
users = MODEL.all
puts "users.any?"
users.any?
users = nil
users = MODEL.all
puts "users.none?"
users.none?
users = nil
users = MODEL.all
puts "users.blank?"
users.blank?
users = nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.