From 411050cd0044e621f96b7d3bf10a20979f64178b Mon Sep 17 00:00:00 2001 From: Jared Beck Date: Wed, 4 May 2016 14:56:10 -0400 Subject: [PATCH] Docs: Update STI docs re: 23ffbdc7e1 [ci skip] --- README.md | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 486d184b..e680de4d 100644 --- a/README.md +++ b/README.md @@ -984,28 +984,20 @@ then there is no need to use `attr_accessible`. ## Single Table Inheritance (STI) -PaperTrail supports [Single Table Inheritance][39], but the base -model must be versioned (must call `has_paper_trail`). +PaperTrail supports [Single Table Inheritance][39], and even supports an +un-versioned base model, as of 23ffbdc7e1. ```ruby -# correct -class Fruit < ActiveRecord::Base - has_paper_trail -end -class Banana < Fruit -end - -# incorrect class Fruit < ActiveRecord::Base + # un-versioned base model end class Banana < Fruit has_paper_trail end ``` -In order to support [polymorphic associations][40], when PaperTrail inserts -records in the the `versions` table, it saves the name of the base class in the -`item_type` column, as required by ActiveRecord. +However, there is a known issue when reifying [associations](#associations), +see https://github.com/airblade/paper_trail/issues/594 ## Custom Version Classes