User.where(:id =>nil) #=> []User Load (0.5ms) SELECT `users`.* FROM `users` WHERE `users`.`id` IS NULL ORDER BY created_at DESC
但是我找不到如何打印IS NOT NULL?
User.where.not(id: nil)