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

Commit 66dc72b

Browse files
committed
"def self.included(target)" belongs outside of ClassMethods
1 parent f9865f5 commit 66dc72b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/exception_notification/consider_local.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#This didn't belong on ExceptionNotifier and made backtraces worse. To keep original functionality in place
22
#'ActionController::Base.send :include, ExceptionNotification::ConsiderLocal' or just include in your controller
33
module ExceptionNotification::ConsiderLocal
4+
def self.included(target)
5+
require 'ipaddr'
6+
target.extend(ClassMethods)
7+
end
8+
49
module ClassMethods
5-
def self.included(target)
6-
require 'ipaddr'
7-
target.extend(ClassMethods)
8-
end
9-
1010
def consider_local(*args)
1111
local_addresses.concat(args.flatten.map { |a| IPAddr.new(a) })
1212
end

0 commit comments

Comments
 (0)