Skip to content

Commit

Permalink
Merge pull request #1185 from masato-bkn/adjust-rails-redundant-activ…
Browse files Browse the repository at this point in the history
…e-record-all-method

Remove NOTE tag from `Rails/RedundantActiveRecordAllMethod` description for readability
  • Loading branch information
koic committed Nov 20, 2023
2 parents 0a80ba9 + 013a589 commit 9d90b6c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/rubocop/cop/rails/redundant_active_record_all_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ def allowed_receivers

# Detect redundant `all` used as a receiver for Active Record query methods.
#
# NOTE: For the methods `delete_all` and `destroy_all`,
# this cop will only check cases where the receiver is a model.
# For the methods `delete_all` and `destroy_all`, this cop will only check cases where the receiver is a model.
# It will ignore cases where the receiver is an association (e.g., `user.articles.all.delete_all`).
# This is because omitting `all` from an association changes the methods
# from `ActiveRecord::Relation` to `ActiveRecord::Associations::CollectionProxy`,
Expand Down

0 comments on commit 9d90b6c

Please sign in to comment.