http://www.noobkit.com/show/ruby/ruby/ruby-core/hash/invert.html
-----Original Message-----
From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
[mailto:rubyonrails-talk@googlegroups.com] On Behalf Of Neal L
Sent: Monday, November 03, 2008 2:35 PM
To: Ruby on Rails: Talk
Subject: [Rails] Reverse keys and values in a hash
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!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---