Say, I have two Ruby objects #<Person id:1, first:"Jane", last:"Doe">
and #<Person id:2, first:"Jane", last:"Doe">
and I would like to compare them WITHOUT considering the attribute id
(or any other undesired attributes) and see if the two objects are similar.
Would be interested in learning how to use Ruby best practices to effectively ignore attributes and compare the two objects.
We would appreciate code examples for both plain Ruby object and ActiveRecord object if possible.