Skip to content

Commit 6cef8c7

Browse files
committed
oops, move deprecation warning out of test and into code
1 parent 7915516 commit 6cef8c7

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

fixtures/rails_3_2_22_no_init/app/controllers/other_things_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ def other_action
99
end
1010

1111
def secure_header_options_for(header, options)
12-
warn "[DEPRECATION] secure_header_options_for will not be supported in secure_headers 3.x."
1312
if params[:action] == "other_action"
1413
if header == :csp
1514
options.merge(:style_src => "'self'")

lib/secure_headers.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ def set_x_permitted_cross_domain_policies_header(options=self.class.secure_heade
212212
# we can't use ||= because I'm overloading false => disable, nil => default
213213
# both of which trigger the conditional assignment
214214
def secure_header_options_for(type, options)
215+
warn "[DEPRECATION] secure_header_options_for will not be supported in secure_headers 3.x."
215216
options.nil? ? ::SecureHeaders::Configuration.send(type) : options
216217
end
217218

0 commit comments

Comments
 (0)