Understanding blank?, present?, empty?, any?, and nil? in Ruby (and Rails)

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 https://rubyonrails.ba/single/understanding-blank-present-empty-any-and-nil-in-ruby-and-rails

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles