1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00

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

View file

@ -6,7 +6,10 @@ module PaperTrail
included do
belongs_to :item, :polymorphic => true
if PaperTrail::VersionAssociation.table_exists?
has_many :version_associations, :dependent => :destroy
end
validates_presence_of :event