I want to convert:
[:one, :two, :three]
to:
{one: :one, two: :two, three: :three}
So far I'm using this:
Hash[[:basic, :silver, :gold, :platinum].map { |e| [e, e] }]
But I would like to know if it's possible by some other way?
This is to use in a Rails enum
definition in model, to save values as strings in db.