Skip to content

Commit 0cc560c

Browse files
authored
Merge pull request #272 from koenpunt/patch-1
hook include of helper to loading of ActionView
2 parents 9bf22e7 + fbb4dc2 commit 0cc560c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/secure_headers/view_helper.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ def nonced_tag(type, content_or_options, block)
108108
end
109109
end
110110

111-
module ActionView #:nodoc:
112-
class Base #:nodoc:
113-
include SecureHeaders::ViewHelpers
114-
end
115-
end
111+
ActiveSupport.on_load :action_view do
112+
include SecureHeaders::ViewHelpers
113+
end if defined?(ActiveSupport)

0 commit comments

Comments
 (0)