Forum: Ruby on Rails Reverse keys and values in a hash

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Neal L (Guest)
on 2008-11-04 00:35
(Received via mailing list)
Hello all,

This is more of a ruby question than a rails question, but I'm
wondering if it's possible to reverse the keys and values in a hash.

I'm using a hash to map fields from one component of my app to
another, and sometimes the data needs to go "the other way"...

Roy P. (Guest)
on 2008-11-04 00:58
(Received via mailing list)
This topic is locked and can not be replied to.