mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #9901 from vipulnsward/fix_some_typos
Fix some typos
This commit is contained in:
commit
0c7a283140
5 changed files with 5 additions and 5 deletions
|
@ -421,7 +421,7 @@ module ActionController
|
||||||
# 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 @@ module ActionDispatch
|
||||||
(([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 @@ module ApplicationTests
|
||||||
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 @@ module ApplicationTests
|
||||||
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 @@ module ApplicationTests
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue