This project is archived and is in readonly mode.

#1098 ✓resolved
rbpandey

Equality Problems with ActiveResource::Base

Reported by rbpandey | September 23rd, 2008 @ 09:42 PM

The == method was improperly implemented. Therefore, the test provided in the patch would fail. Essentially, two resources with different prefix options passed the equality check. I don't think the .equal? should have been used in the object equality comparison implementation (== method), as per the RDoc for Object "it is used to determine object identity (that is, a.equal?(b) iff a is the same object as b)". For now, I think comparing, at minimum, the id and prefix_options fields is appropriate.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages