Skip to content

Commit

Permalink
Fix a typo in the doc for Rails/SkipsModelValidations
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Oct 14, 2020
1 parent 5c7ff67 commit 539e11f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/cops_rails.adoc
Expand Up @@ -3992,7 +3992,7 @@ This cop checks for the use of methods which skip
validations which are listed in
https://guides.rubyonrails.org/active_record_validations.html#skipping-validations

Methods may be ignored from this rule by configuring a `Whitelist`.
Methods may be ignored from this rule by configuring a `AllowedMethods`.

=== Examples

Expand All @@ -4015,7 +4015,7 @@ user.update(website: 'example.com')
FileUtils.touch('file')
----

==== Whitelist: ["touch"]
==== AllowedMethods: ["touch"]

[source,ruby]
----
Expand Down
4 changes: 2 additions & 2 deletions lib/rubocop/cop/rails/skips_model_validations.rb
Expand Up @@ -7,7 +7,7 @@ module Rails
# validations which are listed in
# https://guides.rubyonrails.org/active_record_validations.html#skipping-validations
#
# Methods may be ignored from this rule by configuring a `Whitelist`.
# Methods may be ignored from this rule by configuring a `AllowedMethods`.
#
# @example
# # bad
Expand All @@ -26,7 +26,7 @@ module Rails
# user.update(website: 'example.com')
# FileUtils.touch('file')
#
# @example Whitelist: ["touch"]
# @example AllowedMethods: ["touch"]
# # bad
# DiscussionBoard.decrement_counter(:post_count, 5)
# DiscussionBoard.increment_counter(:post_count, 5)
Expand Down

0 comments on commit 539e11f

Please sign in to comment.