Objects are compared by id, may be comparing by primary_key is more general

As described in http://apidock.com/rails/v3.2.13/ActiveResource/Base/%3D%3D, objects are compared by classes and ids. For one of my models I use old_entity_hash as primary key. So I must check equality of two objects manually. I think that using their primary key as field to compare objects is better. I’ve implemented this in project and it works great. Before opening pull request i’d better ask your opinions.

You can’t compare two non-persisted objects with primary key, it will break compatibility. You can always implement new custom logic in your application or even a gem, but i can see no point in messing with == in AR.