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.
Bbf55d9960b9905e57621d5da6727b2d?d=identicon&s=25 Neal L (Guest)
on 2008-11-03 23: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!
D6434aa0b7b350f8c3ed0119d81b2ead?d=identicon&s=25 Roy Pardee (rpardee)
on 2008-11-03 23:58
(Received via mailing list)
This topic is locked and can not be replied to.