http://www.noobkit.com/show/ruby/ruby/ruby-core/hash/invert.html

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] 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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to