Refactoring this code that produces a reverse-lookup hash from another hash
- by Frank Joseph Mattia
This code is based on the idea of a Form Object
http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-fat-activerecord-models/
(see #3 if unfamiliar with the concept).
My actual code in question may be found here: https://gist.github.com/frankjmattia/82a9945f30bde29eba88
The code takes a hash of objects/attributes and creates a reverse…