Understanding blank?, present?, empty?, any?, and nil? in Ruby (and Rails)
23-Jun-2021 1842
In Ruby on Rails, there are several methods available for checking the state of an object.The most common ones include:blank?present?empty?any?nil?It can be pretty confusing to know which method to use and when. For instance, blank? and empty? sound like they would behave the same way. However, they are NOT the same.
Understanding blank?, present?, empty?, any?, and nil? in Ruby (and Rails) #ruby #rubydeveloper #rubyonrails #Understanding #blank?, #present?, #empty?, #any?, #Rails) https://rubyonrails.ba/link/understanding-blank-present-empty-any-and-nil-in-ruby-and-rails