goncalossilva/rails3_acts_as_paranoid — pull request #84 by TiagoCardoso1983 (2012-11-16 16:33:22+00:00)
Title: Composite Primary Keys Support

Changed the way one interacts with the primary keys in order for it to support this gem: https://github.com/drnic/composite_primary_keys . When calling primary_key on a class it returns an array of keys instead of a key. As for the id call on an object, it returns an array of its primary key values. So, I just updated the 3 places where the primary key is being used to conform to this structure as well as with the expected standard case of one primary key. For this reason I didn't write specific tests for the composite case.

This has the additional overhead of creating certain data structures to handle these cases, which I don't know if it could be a deal-breaker from your perspective.

If indeed you see this as not really a support case you want to provide, could you at least isolate the way one handles the primary key, so that it becomes more easily patchable for the ones who want to support composite primary keys?

Of course, we can discuss possible culprits before we reach a definite conclusion.