Use compact_blank to remove empty strings from Arrays and Hashes - Andy Croll

Active Support is a library of “useful” things that support (!) the other parts of Rails. It includes ways to extend the base Ruby classes, such as Hash, String and Integer.Even the most experienced Rails developer is constantly finding helpful methods in Active Support. And useful methods are continually being added in new versions of the library.We often have to clean up the values ofHashes and Arrays when parsing parameters, or if our code accepts complex input. Ruby provides the .
Use compact_blank to remove empty strings from Arrays and Hashes - Andy Croll #ruby #rubydeveloper #rubyonrails #arrays https://rubyonrails.ba/single/use-compact_blank-to-remove-empty-strings-from-arrays-and-hashes-andy-croll

Nezir Zahirovic

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

related articles