diff options
author | Kevin Deisz <kevin.deisz@gmail.com> | 2018-08-24 16:16:41 -0400 |
---|---|---|
committer | Kevin Deisz <kevin.deisz@gmail.com> | 2018-08-24 16:16:41 -0400 |
commit | 0efecd913c07104e8fba82d5044c1ad824af68d5 (patch) | |
tree | 077b4398346ab4b9906ef22ceb1bdf83eb1d64d3 /actionpack | |
parent | cac2bb7f44a6b8e240034d1de89a41fe0dd9f0ec (diff) | |
download | rails-0efecd913c07104e8fba82d5044c1ad824af68d5.tar.gz rails-0efecd913c07104e8fba82d5044c1ad824af68d5.tar.bz2 rails-0efecd913c07104e8fba82d5044c1ad824af68d5.zip |
Convert remaining usage of whitelist and blacklist
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/metal/live.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb index 2f4c8fb83c..b1c2391afe 100644 --- a/actionpack/lib/action_controller/metal/live.rb +++ b/actionpack/lib/action_controller/metal/live.rb @@ -86,7 +86,7 @@ module ActionController # Note: SSEs are not currently supported by IE. However, they are supported # by Chrome, Firefox, Opera, and Safari. class SSE - WHITELISTED_OPTIONS = %w( retry event id ) + PERMITTED_OPTIONS = %w( retry event id ) def initialize(stream, options = {}) @stream = stream @@ -111,7 +111,7 @@ module ActionController def perform_write(json, options) current_options = @options.merge(options).stringify_keys - WHITELISTED_OPTIONS.each do |option_name| + PERMITTED_OPTIONS.each do |option_name| if (option_value = current_options[option_name]) @stream.write "#{option_name}: #{option_value}\n" end diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index ff325afc54..07e3be4db8 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -553,10 +553,10 @@ module ActionDispatch # # match 'json_only', constraints: { format: 'json' }, via: :get # - # class Whitelist + # class PermitList # def matches?(request) request.remote_ip == '1.2.3.4' end # end - # match 'path', to: 'c#a', constraints: Whitelist.new, via: :get + # match 'path', to: 'c#a', constraints: PermitList.new, via: :get # # See <tt>Scoping#constraints</tt> for more examples with its scope # equivalent. |