PaperTrail + Inheritance #1524

Tuckie opened this Issue Feb 14, 2013 · 1 comment

1 participant


I have a model "Article" that inherits from the model "Page"

Using PaperTrail, the item_type is stored as Page (which is the expected STI behavior) in the versions table.

When I pull up the history, however, it is looking for item_type "Article"
I believe that the issue is located at:

I think changing to should be enough to fix this?


Edit on my original line 70 suggestion: change to

          if ==
            versions = ::Version.where :item_type =>
            versions = ::Version.where :item_id => model.model.all

As we need to get a list of only that exact subclass of items.

Line 84 would be:

versions = ::Version.where :item_type =>, :item_id =>

(Sorry for not submitting a pull request, I'm behind an aggressive firewall)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment