method
blank?
blank?()
public
An object is blank if it’s false, empty, or a whitespace string. For example, "", " ", nil, [], and {} are blank.
This simplifies:
if !address.nil? && !address.empty?
…to:
if !address.blank?
blank?()
public
An object is blank if it’s false, empty, or a whitespace string. For example, "", " ", nil, [], and {} are blank.
This simplifies:
if !address.nil? && !address.empty?
…to:
if !address.blank?