I am migrating my application from Rails4.2.8 to Rails5.2.3, updated paper-trail gem version '7.1.2' to '10.3.1'.I am using Rspec - 3.8.2. Everything worked fine but my specs are failing for models which used 'has_paper_trail' macro.
Tried looking into my codes as well as gem repo, didn't found such attribute anywhere.
Found some similar issue but it didn't helped. https://github.com/paper-trail-gem/paper_trail/issues/455
ActiveModel::UnknownAttributeError:unknown attribute 'foreign_type' for PaperTrail::VersionAssociation.
You need to add column foreign_type
into version_associations
tables after upgrading gem paper_trail
.
Run rails g paper_trail_association_tracking:add_foreign_type_to_version_associations
and then migrate your database.
These changes were done in gem paper_trail-association_tracking
which is one of the dependencies for paper_trail
gem.
Ref: CHANGELOG
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With