close #465; versions_associations association should not be initialized on the VersionConcern unless the table was created

This commit is contained in:
Ben Atkins 2015-01-20 15:25:06 -05:00
parent 122c2d6893
commit 9542529e79
1 changed files with 4 additions and 1 deletions

View File

@ -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