Created
January 11, 2019 14:31
-
-
Save nateberkopec/c073fbcd560d9fe1b04d476cb538d267 to your computer and use it in GitHub Desktop.
present test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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