Skip to content

Commit 371a6fa

Browse files
author
Rafael Mendonça França
committed
Define the method in the right place
1 parent b0895de commit 371a6fa

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/rails-html-sanitizer.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ def white_list_sanitizer
2626
module ActionView
2727
module Helpers
2828
module SanitizeHelper
29-
if method_defined?(:sanitizer_vendor) || private_method_defined?(:sanitizer_vendor)
30-
undef_method(:sanitizer_vendor)
31-
end
29+
module ClassMethods
30+
if method_defined?(:sanitizer_vendor) || private_method_defined?(:sanitizer_vendor)
31+
undef_method(:sanitizer_vendor)
32+
end
3233

33-
def sanitizer_vendor
34-
Rails::Html::Sanitizer
34+
def sanitizer_vendor
35+
Rails::Html::Sanitizer
36+
end
3537
end
3638
end
3739
end

0 commit comments

Comments
 (0)