Is there a cleaner way to do something like this?
%w[address city state postal country].map(&:to_sym)
#=> [:address, :city, :state, :postal, :country]
I would have figured %s
would have done what I wanted, but it doesn't. It just takes everything between the brackets and makes one big symbol out of it.
Just a minor annoyance.