Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
"def self.included(target)" belongs outside of ClassMethods
Browse files Browse the repository at this point in the history
  • Loading branch information
azimux committed Sep 23, 2010
1 parent f9865f5 commit 66dc72b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/exception_notification/consider_local.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#This didn't belong on ExceptionNotifier and made backtraces worse. To keep original functionality in place
#'ActionController::Base.send :include, ExceptionNotification::ConsiderLocal' or just include in your controller
module ExceptionNotification::ConsiderLocal
def self.included(target)
require 'ipaddr'
target.extend(ClassMethods)
end

module ClassMethods
def self.included(target)
require 'ipaddr'
target.extend(ClassMethods)
end

def consider_local(*args)
local_addresses.concat(args.flatten.map { |a| IPAddr.new(a) })
end
Expand Down

0 comments on commit 66dc72b

Please sign in to comment.