Skip to content

Commit

Permalink
Condensing code in the 'included' method on the Controller module.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Atkins committed Nov 16, 2012
1 parent 50f94af commit 2827d0a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/paper_trail/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ module Controller

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
Expand Down

0 comments on commit 2827d0a

Please sign in to comment.