Skip to content

Commit

Permalink
hook include of helper to loading of ActionView
Browse files Browse the repository at this point in the history
When using rspec with rails-controller-testing, specs would break due to incorrect load order. More info here: rails/rails-controller-testing#24
  • Loading branch information
koenpunt authored Jul 13, 2016
1 parent 9bf22e7 commit 129720e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/secure_headers/view_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ def nonced_tag(type, content_or_options, block)
end
end

module ActionView #:nodoc:
class Base #:nodoc:
include SecureHeaders::ViewHelpers
end
ActiveSupport.on_load :action_view do
include SecureHeaders::ViewHelpers
end

0 comments on commit 129720e

Please sign in to comment.