I am using Rails 3.2.2 and I would like to quote all array elements with \' and return a string containing all those quoted and comma-separated elements. At this ti
\'
I use
"'#{%w{a b c}.join("', '")}'"
Here is expanded version:
' # Starting quote %w{a b c}.join("', '") # Join array with ', ' delimiter that would give a', 'b', 'c ' # Closing quote