Topic: Diff between two hashes
Maybe the title is a bit misleading as it must not explicitly be hashes I have to compare but it can be any data type, but as Rails params are hashes this seems to me straightforward.
I need to track the difference between different versions of a document.
So I started with the recipe 59 from the Rails Recipe book and I am now storing the needed parts of the params in a text field in the DB.
I now would like to ask for the most convenient approach to compare these values in order to store only the difference of two values.
What is the most convenient data type for comparing ? Hashes, arrays, yaml objects ?
Or is iterating over hashes and comparing each key and value the only (and cumbersome) way ?