SyntaxFix
Write A Post
Hire A Developer
Questions
A bit more readable one, map it to an array of single-element hashes and reduce that with merge
map
reduce
merge
the_hash.map{ |key,value| {key => "%#{value}%"} }.reduce(:merge)