Skip to content

Commit

Permalink
Use behavior instead of behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed May 8, 2022
1 parent 51f57d5 commit a374733
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Expand Up @@ -25,6 +25,9 @@ InternalAffairs/UndefinedConfig:

Naming/InclusiveLanguage:
FlaggedTerms:
behaviour:
Suggestions:
- behavior
offence:
Suggestions:
- offense
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/ROOT/pages/cops_rails.adoc
Expand Up @@ -2168,7 +2168,7 @@ Relying on instance variables makes it difficult to re-use helper
methods.

If it seems awkward to explicitly pass in each dependent
variable, consider moving the behaviour elsewhere, for
variable, consider moving the behavior elsewhere, for
example to a model, decorator or presenter.

Provided that a class inherits `ActionView::Helpers::FormBuilder`,
Expand Down Expand Up @@ -2856,7 +2856,7 @@ mixins on the filter, but these can confuse developers. If you specify
methods that are defined in other classes or modules, you should
define the filter in that class or module.

If you rely on behaviour defined in the superclass actions, you must
If you rely on behavior defined in the superclass actions, you must
remember to invoke `super` in the subclass actions.

=== Examples
Expand Down Expand Up @@ -2922,7 +2922,7 @@ end
class ArticlesController < ContentController
before_action :load_article, only: [:update]
# the cop requires this method, but it relies on behaviour defined
# the cop requires this method, but it relies on behavior defined
# in the superclass, so needs to invoke `super`
def update
super
Expand Down
6 changes: 3 additions & 3 deletions legacy-docs/cops_rails.md
Expand Up @@ -1030,7 +1030,7 @@ Relying on instance variables makes it difficult to re-use helper
methods.

If it seems awkward to explicitly pass in each dependent
variable, consider moving the behaviour elsewhere, for
variable, consider moving the behavior elsewhere, for
example to a model, decorator or presenter.

### Examples
Expand Down Expand Up @@ -1379,7 +1379,7 @@ mixins on the filter, but these can confuse developers. If you specify
methods that are defined in other classes or modules, you should
define the filter in that class or module.

If you rely on behaviour defined in the superclass actions, you must
If you rely on behavior defined in the superclass actions, you must
remember to invoke `super` in the subclass actions.

### Examples
Expand Down Expand Up @@ -1440,7 +1440,7 @@ end
class ArticlesController < ContentController
before_action :load_article, only: [:update]

# the cop requires this method, but it relies on behaviour defined
# the cop requires this method, but it relies on behavior defined
# in the superclass, so needs to invoke `super`
def update
super
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rails/helper_instance_variable.rb
Expand Up @@ -10,7 +10,7 @@ module Rails
# methods.
#
# If it seems awkward to explicitly pass in each dependent
# variable, consider moving the behaviour elsewhere, for
# variable, consider moving the behavior elsewhere, for
# example to a model, decorator or presenter.
#
# Provided that a class inherits `ActionView::Helpers::FormBuilder`,
Expand Down
4 changes: 2 additions & 2 deletions lib/rubocop/cop/rails/lexically_scoped_action_filter.rb
Expand Up @@ -12,7 +12,7 @@ module Rails
# methods that are defined in other classes or modules, you should
# define the filter in that class or module.
#
# If you rely on behaviour defined in the superclass actions, you must
# If you rely on behavior defined in the superclass actions, you must
# remember to invoke `super` in the subclass actions.
#
# @example
Expand Down Expand Up @@ -71,7 +71,7 @@ module Rails
# class ArticlesController < ContentController
# before_action :load_article, only: [:update]
#
# # the cop requires this method, but it relies on behaviour defined
# # the cop requires this method, but it relies on behavior defined
# # in the superclass, so needs to invoke `super`
# def update
# super
Expand Down

0 comments on commit a374733

Please sign in to comment.