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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community 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"...

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