I am currently looking for a software/web development job preferably as a Rails-based developer.
Please email me at email@example.com. Thanks in advance for any leads!
How To Get Whodunnit User Instance From PaperTrail
Posted by Weston Ganger
When I called whodunnit with papertrail on a version I usually want the user instance.
We are going to add a monkey patch in config/intializers
# config/initializers/paper_trail_monkey_patch.rb module PaperTrail class Version def user User.find(whodunnit) if whodunnit end end end
Now whenever you want the user of a version just call user.
Related External Links: