For clarity merging hashes use with_defaults - Andy Croll
Rails is known for adding methods to existing core Ruby classes for improved readability via Active Support. One such example is the with_defaults method on Hash. This method is an alias of another added method reverse_merge, which should give you a clue as to how it works.As you can see in the source code, the implementation is fairly straightforward.
For clarity merging hashes use with_defaults - Andy Croll #ruby #rubydeveloper #rubyonrails