Question

I've used paper_trail for a couple of models in my rails 3 app but I've hit a snag when trying to apply it to a join model - its primary key is not id.

I checked the doc and the source but couldn't see any options to override the use of id. Any suggestions?

Était-ce utile?

La solution

The simplest fix is just to add a method, id, that references the primary key. Once paper_trail has that it's happy.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top