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: https://github.com/sferik/rails_admin/blob/master/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb#L70
I think changing model.model.name to model.model.base_class.name should be enough to fix this?
Edit on my original line 70 suggestion: change to
if model.model.base_class.name == model.model.name
versions = ::Version.where :item_type => model.model.name
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 => model.model.base_class.name, :item_id => object.id
(Sorry for not submitting a pull request, I'm behind an aggressive firewall)