知识点:nil? blank? empty? present?

.nil?

.empty?

.blank?

nil.blank? = true 
[].blank? = true 
{}.blank? = true 
"".blank? = true 
5.blank? == false

" ".blank? == true " ".empty? == false

Quick tip: !obj.blank? == obj.present?

def present? 
 !blank?
end