From f74aa80f0c5fdc56f2e618aeb743ae33552932e6 Mon Sep 17 00:00:00 2001 From: Jessie Keck Date: Wed, 30 May 2018 10:01:56 -0700 Subject: [PATCH] Overwrite the PaperTrail.config.track_associations option to be false This was introduced (accidentally) upstream in 9.1.0 --- lib/generators/spotlight/install_generator.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/generators/spotlight/install_generator.rb b/lib/generators/spotlight/install_generator.rb index 6850eb251..9f3ec2d6c 100644 --- a/lib/generators/spotlight/install_generator.rb +++ b/lib/generators/spotlight/install_generator.rb @@ -33,6 +33,16 @@ def paper_trail generate 'paper_trail:install' end + # Overriding paper trail initializer to turn track_associations off + # This was off by default prior to paper trail 9.1.0 but is now generated as on + def override_paper_trail_initializer + gsub_file( + 'config/initializers/paper_trail.rb', + 'PaperTrail.config.track_associations = true', + 'PaperTrail.config.track_associations = false' + ) + end + def sitemaps gem 'sitemap_generator'