提交 0c7a2831 编写于 作者: V Vijay Dev

Merge pull request #9901 from vipulnsward/fix_some_typos

Fix some typos
...@@ -421,7 +421,7 @@ def hash_filter(params, filter) ...@@ -421,7 +421,7 @@ def hash_filter(params, filter)
# Declaration { comment_ids: [] }. # Declaration { comment_ids: [] }.
array_of_permitted_scalars_filter(params, key) array_of_permitted_scalars_filter(params, key)
else else
# Declaration { user: :name } or { user: [:name, :age, { adress: ... }] }. # Declaration { user: :name } or { user: [:name, :age, { address: ... }] }.
params[key] = each_element(value) do |element| params[key] = each_element(value) do |element|
if element.is_a?(Hash) if element.is_a?(Hash)
element = self.class.new(element) unless element.respond_to?(:permit) element = self.class.new(element) unless element.respond_to?(:permit)
......
...@@ -101,7 +101,7 @@ class GetIp ...@@ -101,7 +101,7 @@ class GetIp
(([0-9A-Fa-f]{1,4}:){0,4}:([0-9A-Fa-f]{1,4}:){1}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)) | # ip v6 with compatible to v4 (([0-9A-Fa-f]{1,4}:){0,4}:([0-9A-Fa-f]{1,4}:){1}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)) | # ip v6 with compatible to v4
(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d) |(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)) | # ip v6 with compatible to v4 (::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d) |(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)) | # ip v6 with compatible to v4
([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4}) | # ip v6 with compatible to v4 ([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4}) | # ip v6 with compatible to v4
(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4}) | # ip v6 with double colon at the begining (::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4}) | # ip v6 with double colon at the beginning
(([0-9A-Fa-f]{1,4}:){1,7}:) # ip v6 without ending (([0-9A-Fa-f]{1,4}:){1,7}:) # ip v6 without ending
)$) )$)
}x }x
......
...@@ -599,7 +599,7 @@ def create ...@@ -599,7 +599,7 @@ def create
assert_equal :log, ActionController::Parameters.action_on_unpermitted_parameters assert_equal :log, ActionController::Parameters.action_on_unpermitted_parameters
end end
test "config.action_controller.action_on_unpermitted_parameters is :log by defaul on test" do test "config.action_controller.action_on_unpermitted_parameters is :log by default on test" do
ENV["RAILS_ENV"] = "test" ENV["RAILS_ENV"] = "test"
require "#{app_path}/config/environment" require "#{app_path}/config/environment"
......
...@@ -23,7 +23,7 @@ def teardown ...@@ -23,7 +23,7 @@ def teardown
assert $:.include?("#{app_path}/app/models") assert $:.include?("#{app_path}/app/models")
end end
test "initializing an application allows to load code on lib path inside application class definitation" do test "initializing an application allows to load code on lib path inside application class definition" do
app_file "lib/foo.rb", <<-RUBY app_file "lib/foo.rb", <<-RUBY
module Foo; end module Foo; end
RUBY RUBY
......
...@@ -33,7 +33,7 @@ def teardown ...@@ -33,7 +33,7 @@ def teardown
assert_equal false, ActionDispatch::Cookies::CookieJar.always_write_cookie assert_equal false, ActionDispatch::Cookies::CookieJar.always_write_cookie
end end
test 'always_write_cookie can be overrided' do test 'always_write_cookie can be overridden' do
add_to_config <<-RUBY add_to_config <<-RUBY
config.action_dispatch.always_write_cookie = false config.action_dispatch.always_write_cookie = false
RUBY RUBY
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册