From 2827d0aad42cc9ce14ce1926c65add6742cb0d18 Mon Sep 17 00:00:00 2001 From: Ben Atkins Date: Fri, 16 Nov 2012 12:16:28 -0500 Subject: [PATCH] Condensing code in the 'included' method on the Controller module. --- lib/paper_trail/controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/paper_trail/controller.rb b/lib/paper_trail/controller.rb index 1e18887f..974d1c7c 100644 --- a/lib/paper_trail/controller.rb +++ b/lib/paper_trail/controller.rb @@ -3,15 +3,14 @@ module PaperTrail def self.included(base) base.before_filter :set_paper_trail_enabled_for_controller - base.before_filter :set_paper_trail_whodunnit - base.before_filter :set_paper_trail_controller_info + base.before_filter :set_paper_trail_whodunnit, :set_paper_trail_controller_info end protected # Returns the user who is responsible for any changes that occur. # By default this calls `current_user` and returns the result. - # + # # Override this method in your controller to call a different # method, e.g. `current_person`, or anything you like. def user_for_paper_trail