Rename behaviour to behavior in documentation

This commit is contained in:
Gannon McGibbon 2022-05-25 19:48:46 -04:00
parent 90c0bde47c
commit 3dad2919d5
15 changed files with 17 additions and 17 deletions

View File

@ -98,7 +98,7 @@ module ActionCable
# This should return the underlying io according to the SPEC:
@rack_hijack_io = @socket_object.env["rack.hijack"].call
# Retain existing behaviour if required:
# Retain existing behavior if required:
@rack_hijack_io ||= @socket_object.env["rack.hijack_io"]
@event_loop.attach(@rack_hijack_io, self)

View File

@ -28,7 +28,7 @@
* Add the ability to use custom logic for storing and retrieving CSRF tokens.
By default, the token will be stored in the session. Custom classes can be
defined to specify arbitrary behaviour, but the ability to store them in
defined to specify arbitrary behavior, but the ability to store them in
encrypted cookies is built in.
*Andrew Kowpak*

View File

@ -80,7 +80,7 @@ module ActionController
# Provides a proxy to access helper methods from outside the view.
#
# Note that the proxy is rendered under a different view context.
# This may cause incorrect behaviour with capture methods. Consider
# This may cause incorrect behavior with capture methods. Consider
# using {helper}[rdoc-ref:AbstractController::Helpers::ClassMethods#helper]
# instead when using +capture+.
def helpers

View File

@ -139,7 +139,7 @@ module ActionController # :nodoc:
# end
#
# def handle_unverified_request
# # Custom behaviour for unverfied request
# # Custom behavior for unverfied request
# end
# end
#

View File

@ -275,7 +275,7 @@ module ActionController
comparisons between instances of `ActionController::Parameters`. If
you need to compare to a hash, first convert it using
`ActionController::Parameters#new`.
To disable the deprecated behaviour set
To disable the deprecated behavior set
`Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false`.
WARNING
@parameters == other

View File

@ -595,7 +595,7 @@ module ActionView
# We ignore any extra parameters in the request_uri if the
# submitted URL doesn't have any either. This lets the function
# work with things like ?order=asc
# the behaviour can be disabled with check_parameters: true
# the behavior can be disabled with check_parameters: true
request_uri = url_string.index("?") || check_parameters ? request.fullpath : request.path
request_uri = URI::DEFAULT_PARSER.unescape(request_uri).force_encoding(Encoding::BINARY)

View File

@ -24,7 +24,7 @@
was called before calling `perform_now`. When a record no longer exists
and is serialized using GlobalID this led to raising
an `ActiveJob::DeserializationError` before reaching `perform_now` call.
This behaviour makes difficult testing the job `discard_on/retry_on` logic.
This behavior makes difficult testing the job `discard_on/retry_on` logic.
Now `deserialize_arguments_if_needed` call is postponed to when `perform_now`
is called.

View File

@ -116,7 +116,7 @@ module ActiveRecord
# true.
# +ApplicationRecord+, for example, is generated as an abstract class.
#
# Consider the following default behaviour:
# Consider the following default behavior:
#
# Shape = Class.new(ActiveRecord::Base)
# Polygon = Class.new(Shape)

View File

@ -114,7 +114,7 @@ class NumericalityValidationTest < ActiveRecord::TestCase
if 123.455.to_d(5) == BigDecimal("123.46")
# BigDecimal's to_d behavior changed in BigDecimal 3.0.1, see https://github.com/ruby/bigdecimal/issues/70
# TODO: replace this with a check against BigDecimal::VERSION, currently
# we just check the behaviour because both versions of BigDecimal report "3.0.0"
# we just check the behavior because both versions of BigDecimal report "3.0.0"
assert_not_predicate subject, :valid?
else
assert_predicate subject, :valid?

View File

@ -792,7 +792,7 @@ Please refer to the [Changelog][active-support] for detailed changes.
`ActiveSupport::TimeZone::MAPPING`.
([Pull Request](https://github.com/rails/rails/pull/31176))
* Changed default behaviour of `ActiveSupport::SecurityUtils.secure_compare`,
* Changed default behavior of `ActiveSupport::SecurityUtils.secure_compare`,
to make it not leak length information even for variable length string.
Renamed old `ActiveSupport::SecurityUtils.secure_compare` to
`fixed_length_secure_compare`, and started raising `ArgumentError` in

View File

@ -418,7 +418,7 @@ end
as long as they have no ordering, since the method needs to force an order
internally to iterate.
If an order is present in the receiver the behaviour depends on the flag
If an order is present in the receiver the behavior depends on the flag
[`config.active_record.error_on_ignored_order`][]. If true, `ArgumentError` is
raised, otherwise the order is ignored and a warning issued, which is the
default. This can be overridden with the option `:error_on_ignore`, explained

View File

@ -606,7 +606,7 @@ rails_blob_path(user.avatar, disposition: "attachment")
```
WARNING: To prevent XSS attacks, Active Storage forces the Content-Disposition header
to "attachment" for some kind of files. To change this behaviour see the
to "attachment" for some kind of files. To change this behavior see the
available configuration options in [Configuring Rails Applications](configuring.html#configuring-active-storage).
If you need to create a link from outside of controller/view context (Background

View File

@ -1165,7 +1165,7 @@ the top level, or on individual controllers.
#### `config.action_controller.allow_deprecated_parameters_hash_equality`
Controls behaviour of `ActionController::Parameters#==` with `Hash` arguments.
Controls behavior of `ActionController::Parameters#==` with `Hash` arguments.
Value of the setting determines whether an `ActionController::Parameters` instance is equal to an equivalent `Hash`.
The default value depends on the `config.load_defaults` target version:

View File

@ -639,10 +639,10 @@ end
get('my_action.csv')
```
Previous behaviour was returning a `text/csv` response's Content-Type which is inaccurate since a JSON response is being rendered.
Current behaviour correctly returns a `application/json` response's Content-Type.
Previous behavior was returning a `text/csv` response's Content-Type which is inaccurate since a JSON response is being rendered.
Current behavior correctly returns a `application/json` response's Content-Type.
If your application relies on the previous incorrect behaviour, you are encouraged to specify
If your application relies on the previous incorrect behavior, you are encouraged to specify
which formats your action accepts, i.e.
```ruby

View File

@ -108,7 +108,7 @@ module Rails
end
end
Behaviour = ActiveSupport::Deprecation::DeprecatedConstantProxy.new("Behaviour", "Behavior")
Behaviour = ActiveSupport::Deprecation::DeprecatedConstantProxy.new("behavior", "Behavior")
end
end
end