diff --git a/lib/paper_trail/version_concern.rb b/lib/paper_trail/version_concern.rb index b99c5e7a..4c95b926 100644 --- a/lib/paper_trail/version_concern.rb +++ b/lib/paper_trail/version_concern.rb @@ -6,7 +6,10 @@ module PaperTrail included do belongs_to :item, :polymorphic => true - has_many :version_associations, :dependent => :destroy + + if PaperTrail::VersionAssociation.table_exists? + has_many :version_associations, :dependent => :destroy + end validates_presence_of :event