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:
parent
122c2d6893
commit
9542529e79
1 changed files with 4 additions and 1 deletions
|
@ -6,7 +6,10 @@ module PaperTrail
|
||||||
|
|
||||||
included do
|
included do
|
||||||
belongs_to :item, :polymorphic => true
|
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
|
validates_presence_of :event
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue