#1309: Support Rails 7 syntax for Rails/EnumHash cop. (@ytjmt)
#1298: Support Rails 7 syntax for Rails/EnumUniqueness cop. (@ytjmt)
Bug fixes
#1335: Fix an error for Rails/BulkChangeTable when the block for change_table is empty. (@earlopain)
#1325: Fix an error for Rails/RenderPlainText when the content type is passed as a constant. (@earlopain)
#1337: Fix an error for Rails/Validation when passing no arguments. (@earlopain)
#1330: Fix an error for Rails/WhereNot when using placeholder without second argument. (@earlopain)
#1311: Fix false negatives for Rails/ActionControllerFlashBeforeRender when using implicit render or rescue blocks. (@tldn0718)
#1313: Fix false positives for Rails/CompactBlank when using collection.reject!. (@koic)
#1319: Fix a false positive for Rails/RedundantPresenceValidationOnBelongsTo when removing presence would leave other non-validation options like allow_blank without validations. (@earlopain)
#1306: Make Rails/PluralizationGrammar aware of byte methods. (@earlopain)
#1302: Allow params receiver by default for Style/CollectionMethods. (@koic)
#1321: Fix an error for Rails/WhereEquals when the second argument is not yet typed (where("foo = ?", )). (@earlopain)
Changes
#1308: Change Rails/CompactBlank to handle select(&:present?). (@fatkodima)
#1303: Change Rails/IgnoredSkipActionFilterOption to handle multiple callbacks. (@fatkodima)
#1199: Make Rails/WhereEquals aware of where.not(...). (@earlopain)
#1003: Change Rails/RootPathnameMethods to detect offenses on Dir.[]. (@r7kamura)
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.
All Depfu comment commands
@depfu rebase
Rebases against your default branch and redoes this update
@depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@depfu cancel merge
Cancels automatic merging of this PR
@depfu close
Closes this PR and deletes the branch
@depfu reopen
Restores the branch and reopens this PR (if it's closed)
@depfu pause
Ignores all future updates for this dependency and closes this PR
@depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ rubocop-rails (2.25.1 → 2.26.1) · Repo · Changelog
Release Notes
2.26.1
2.26.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 68 commits:
Cut 2.26.1
Update Changelog
Merge pull request #1357 from masato-bkn/add-tests-for-rails-compact-blank
Add missing tests for `Rails/CompactBlank` when receiver is a hash
Merge pull request #1349 from fatkodima/application_record_ignore-migrations
Merge pull request #1352 from masato-bkn/fix/rails-pluralization-grammar-example
Fix example in `Rails/PluralizationGrammar`
Change `Rails/ApplicationRecord` to ignore migrations
Merge pull request #1350 from fatkodima/change-enum_syntax-to-autocorrect-underscored-options
Change `Rails/EnumSyntax` to autocorrect underscored options
Merge pull request #1348 from Earlopain/enum-syntax-non-literal
[Fix #1343] False negatives for `Rails/EnumSyntax`
Merge pull request #1347 from Earlopain/offense-message-root-pathname-methods
[Fix #1345] Improve offense message for `Rails/RootPathnameMethods`
Merge pull request #1341 from Earlopain/where-equals-database-qualifier
Merge pull request #1338 from Earlopain/enable-undefined-config
[Fix #1340] Fix a false positive for `Rails/WhereEquals` when qualifying the database name
Enable `InternalAffairs/UndefinedConfig`
Merge pull request #1339 from Earlopain/compatibility-code
Remove RuboCop < 1.52 compatibility code
Switch back docs version to master
Cut 2.26.0
Update Changelog
Merge pull request #1337 from Earlopain/validation-error
Merge pull request #1336 from koic/add_new_rails_enum_syntax_cop
Merge pull request #1309 from ytjmt/support-new-enum-syntax-for-enum-hash-cop
[Fix #1238] Add new `Rails/EnumSyntax` cop
Merge pull request #1335 from Earlopain/error-bulk-change-table
Fix an error for `Rails/Validation` when passing no arguments
Update `Rails/Validation` specs to modern style
Merge pull request #1334 from Earlopain/cop-registry-deprecated
Fix an error for `Rails/BulkChangeTable` when the block for `change_table` is empty
Don't use deprecated `Cop.registry` in specs
Update a changelog file name
Merge pull request #1003 from r7kamura/root-pathname-methods-index
Merge pull request #1323 from Earlopain/where-equal-not
[Fix #1199] Make `Rails/WhereEquals` aware of `where.not(...)`
Merge pull request #1330 from Earlopain/where-not-error
Fix an error for `Rails/WhereNot` without second argument
Merge pull request #1325 from Earlopain/render-plain-text-error
Fix an error for `Rails/RenderPlainText` when the content type is passed as a constant
Merge pull request #1321 from Earlopain/where-equal-error
Fix an error for `Style/WhereEquals` when the second argument is not yet typed
Merge pull request #1320 from Earlopain/rails-version-redundant-presence-validation
[Fix #1319] Fix false positive for `RedundantPresenceValidationOnBelongsTo`
Merge pull request #1316 from Uaitt/documentation-typo
Correct typo in Rails/WhereEquals documentation
Merge pull request #1311 from tldn0718/fix-false-negatives-for-action-controller-flash-before-render
Merge pull request #1302 from koic/make_style_collection_compact_aware_of_params
Allow `params` receiver by default for `Style/CollectionMethods`
Merge pull request #1314 from biow0lf/fix-docs
Use right ticks
Merge pull request #1313 from koic/fix_false_positive_for_rails_compact_blank
Fix false positives for `Rails/CompactBlank`
Merge pull request #1310 from fatkodima/compact_blank-select_present
Support Rails 7 syntax for Rails/EnumHash cop
Fix false negatives for implicit render or rescue blocks
Change `Rails/CompactBlank` to handle `select(&:present?)`
Merge pull request #1307 from padarom/fix-pluck-in-where-documentation
Suppress RuboCop offenses
Clarify the wording of the `Rails/PluckInWhere` cop
Merge pull request #1298 from ytjmt/support-new-enum-syntax-for-enum-uniqueness-cop
Suppress RuboCop offense
Merge pull request #1306 from Earlopain/pluralization-grammar-byte
Make `Rails/PluralizationGrammar` aware of byte methods
Merge pull request #1304 from fatkodima/ignored_skip_action_filter_option-multiple-callbacks
Change `Rails/IgnoredSkipActionFilterOption` to handle multiple callbacks
Switch back docs version to master
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with
@depfu rebase
.All Depfu comment commands