When I try and add a has_paper_trail on any of my models to include versioning for objects created, Sorbet throws the following error:
app/models/model_name.rb:22: Method `has_paper_trail` does not exist on `T.class_of(<ModelName>)` https://srb.help/7003
22 | has_paper_trail
How do I fix this?
I recently ran into the same issue. We're currently using the tapioca gem to generate RBI files on our project.
In order to resolve this I added
require 'paper_trail/frameworks/active_record'tosorbet/tapioca/require.rbfile and ranbin/tapioca gem paper_trailto regenerate the RBI file for the paper_trail gem.Hope this helps.