From ef09502001d2bca5cd7f380281ecc3d58a4f66d7 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Thu, 23 Jul 2009 16:49:48 +0100 Subject: [PATCH] Try to call current_user regardless of its visibility. --- lib/paper_trail.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/paper_trail.rb b/lib/paper_trail.rb index c13a1280..2d392cfc 100644 --- a/lib/paper_trail.rb +++ b/lib/paper_trail.rb @@ -21,7 +21,7 @@ module PaperTrail def set_whodunnit @@whodunnit = lambda { - self.respond_to?(:current_user) ? self.current_user : nil + self.send :current_user rescue nil } end end