Вопрос

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?

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top