I'm making a lookup hash on a Model from a unique name to a unique ID
lookup_hash = Hash[*Country.pluck(:name, :id).flatten]
=>
lookup_hash = {"America" => 12, "Brazil" => 2, "China" => 51...}
That way I have an object that requires a single SQL call that I can use to repeatedly reference in getting the corresponding IDs from an array of names.
It seems useful enough to wonder if there is a shorthand for this.