ankit1910 / paper_trail-globalid

An extension to paper_trail, using this you can fetch actual object who was responsible for this change
MIT License
42 stars 17 forks source link

NameError (undefined local variable or method `paper_trail_store' for PaperTrail:Module) #11

Open srajendran-dropstream opened 4 years ago

srajendran-dropstream commented 4 years ago

While Using Globalid with the below configurations am getting this error -

paper_trail (>= 10.1.0, <= 10.3.1) paper_trail-association_tracking (= 2.0.0) paper_trail-globalid (~> 0.2.0) activerecord (= 6.0.3.1)

=> PaperTrail.whodunnit = admin

Traceback (most recent call last): 1: from (irb):14 NameError (undefined local variable or method `paper_trail_store' for PaperTrail:Module)

charlottepages commented 3 years ago

I had the same issue

looking at the 10.3.1 doc it seems that paper_trail_store is indeed no longer a method of PaperTrail:Module

👉 I've just fixed it by changing PaperTrail.whodunnit = admin to PaperTrail.request.whodunnit = admin

Let me know if it worked for you -> if so we should probably update the paper_trail-globalid gem README

srajendran-dropstream commented 3 years ago

Its working for me. Thanks!