Cheatsheet
nil?
- should only be used to check if something is
nil
or not
- Very commonly used to avoid
NoMethodError
- Something like
if !record.nil? && record.column == ...
empty?
- should be only be used to check if a string, an array, or a hash is empty or not
blank? vs present?
- Basically they are opposite