I can't seem to figure this one out. If I have two hashes, where a value in the first hash should always match a key in the 2nd hash:
hash1 = { :table => 'name', :action => 'view' }
hash2 = { 'name' => 'first_name', 'group' => 'user_group' }
The key :table is a constant, but the value is dynamic. How can I swap the value in hash1 with the value in hash2, where the key matches the value in hash1? Without knowing what the actual key or value will be (other than :table in hash1)? Hope that makes sense, the updated hash1 (or new hash) should look like this:
hash1 = { :table => 'first_name', :action => 'view' }
Thanks in advance.