diff --git a/CHANGELOG.md b/CHANGELOG.md index cbc4a471a7..65493f84ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,35 @@ ## master (unreleased) +### New features + +* [#547](https://github.com/rubocop/rubocop-rails/pull/547): Add new `Rails/ActionOrder` cop. ([@mollerhoj][]) +* [#565](https://github.com/rubocop/rubocop-rails/issues/565): Add cop Rails/WhereNotWithMultipleConditions. ([@niklas-hasselmeyer][]) +* [#771](https://github.com/rubocop/rubocop-rails/pull/771): Add new `Rails/IgnoredColumnsAssignment` cop. ([@fsateler][], [@kkitadate][]) +* [#790](https://github.com/rubocop/rubocop-rails/issues/790): Make `Style/HashExcept` aware of TargetRubyVersion: 2.x because Rails has `Hash#except`. ([@koic][]) + +### Bug fixes + +* [#786](https://github.com/rubocop/rubocop-rails/issues/786): Fix a false negative for `Rails/ActionControllerTestCase` when extending `ActionController::TestCase` and having a method definition. ([@koic][]) +* [#792](https://github.com/rubocop/rubocop-rails/issues/792): Fix a false negative for `Rails/RedundantPresenceValidationOnBelongsTo` when belongs_to at least one block and one hash like `belongs_to :company, -> { where(foo: true) }, inverse_of: :employee`. ([@PedroAugustoRamalhoDuarte][]) +* [#781](https://github.com/rubocop/rubocop-rails/issues/781): Make `Rails/DynamicFindBy` aware of `find_by_token_for`. ([@koic][]) +* [#809](https://github.com/rubocop/rubocop-rails/issues/809): Fix an error for `Rails/FreezeTime` when using `travel_to` without argument. ([@koic][]) +* [#794](https://github.com/rubocop/rubocop-rails/issues/794): Fix an error for `Rails/RedundantReceiverInWithOptions` when calling a method with a receiver in `with_options` without block arguments. ([@koic][]) +* [#782](https://github.com/rubocop/rubocop-rails/issues/782): Fix an incorrect autocorrect for `Rails/EagerEvaluationLogMessage` when using `Style/MethodCallWithArgsParentheses`'s autocorrection together. ([@koic][]) +* [#776](https://github.com/rubocop/rubocop-rails/issues/776): Fix an incorrect autocorrect for `Rails/Presence` when using arithmetic operation in `else` branch. ([@koic][]) +* [#813](https://github.com/rubocop/rubocop-rails/pull/813): Fix errors that occur when unrelated `tag` is investigated by `Rails/ContentTag`. ([@r7kamura][]) +* [#808](https://github.com/rubocop/rubocop-rails/issues/808): Fix false positive for `Rails/ActionControllerFlashBeforeRender` when `render` call precedes `flash` call. ([@americodls][]) +* [#778](https://github.com/rubocop/rubocop-rails/issues/778): Fix a false positive for `Rails/DynamicFindBy` when using `page.find_by_id` as a Capybara testing API. ([@koic][]) +* [#816](https://github.com/rubocop/rubocop-rails/pull/816): Fix an incorrect autocorrect for `Rails/Presence` when a right-hand side of the relational operator. ([@ydah][]) + +### Changes + +* [#779](https://github.com/rubocop/rubocop-rails/issues/779): Add `mail` to `AllowedMethods` of `Style/SymbolProc`. ([@koic][]) +* [#796](https://github.com/rubocop/rubocop-rails/issues/796): Add several directories to `Exclude` to prevent slow investigation. ([@koic][]) +* [#822](https://github.com/rubocop/rubocop-rails/issues/822): Extends `Rails/HttpStatus` cop to check `routes.rb`. ([@anthony-robin][]) +* [#787](https://github.com/rubocop/rubocop-rails/issues/787): Make `Rails/Pluck` aware of all keys. ([@koic][]) +* [#800](https://github.com/rubocop/rubocop-rails/issues/800): Make `Rails/TimeZone` aware of timezone UTF offset. ([@inkstak][]) + ## 2.16.1 (2022-09-17) ### Bug fixes @@ -686,3 +715,8 @@ [@r7kamura]: https://github.com/r7kamura [@americodls]: https://github.com/americodls [@bdewater]: https://github.com/bdewater +[@inkstak]: https://github.com/inkstak +[@PedroAugustoRamalhoDuarte]: https://github.com/PedroAugustoRamalhoDuarte +[@mollerhoj]: https://github.com/mollerhoj +[@niklas-hasselmeyer]: https://github.com/niklas-hasselmeyer +[@fsateler]: https://github.com/fsateler diff --git a/changelog/change_add_mail_to_allowed_methods_of_style_symbol_proc.md b/changelog/change_add_mail_to_allowed_methods_of_style_symbol_proc.md deleted file mode 100644 index b8f64ff046..0000000000 --- a/changelog/change_add_mail_to_allowed_methods_of_style_symbol_proc.md +++ /dev/null @@ -1 +0,0 @@ -* [#779](https://github.com/rubocop/rubocop-rails/issues/779): Add `mail` to `AllowedMethods` of `Style/SymbolProc`. ([@koic][]) diff --git a/changelog/change_add_several_dir_to_exclude_to_prevent_slow_investigation.md b/changelog/change_add_several_dir_to_exclude_to_prevent_slow_investigation.md deleted file mode 100644 index f32f113757..0000000000 --- a/changelog/change_add_several_dir_to_exclude_to_prevent_slow_investigation.md +++ /dev/null @@ -1 +0,0 @@ -* [#796](https://github.com/rubocop/rubocop-rails/issues/796): Add several directories to `Exclude` to prevent slow investigation. ([@koic][]) diff --git a/changelog/change_extends_http_status_to_detect_redirect_routes.md b/changelog/change_extends_http_status_to_detect_redirect_routes.md deleted file mode 100644 index 4ece15cb20..0000000000 --- a/changelog/change_extends_http_status_to_detect_redirect_routes.md +++ /dev/null @@ -1 +0,0 @@ -* [#822](https://github.com/rubocop/rubocop-rails/issues/822): Extends `Rails/HttpStatus` cop to check `routes.rb`. ([@anthony-robin][]) diff --git a/changelog/change_make_rails_pluck_aware_of_all_keys.md b/changelog/change_make_rails_pluck_aware_of_all_keys.md deleted file mode 100644 index 3b54fb55a0..0000000000 --- a/changelog/change_make_rails_pluck_aware_of_all_keys.md +++ /dev/null @@ -1 +0,0 @@ -* [#787](https://github.com/rubocop/rubocop-rails/issues/787): Make `Rails/Pluck` aware of all keys. ([@koic][]) diff --git a/changelog/change_make_rails_time_zone_aware_of_timezone_offset.md b/changelog/change_make_rails_time_zone_aware_of_timezone_offset.md deleted file mode 100644 index 39d525931b..0000000000 --- a/changelog/change_make_rails_time_zone_aware_of_timezone_offset.md +++ /dev/null @@ -1 +0,0 @@ -* [#800](https://github.com/rubocop/rubocop-rails/issues/800): Make `Rails/TimeZone` aware of timezone UTF offset. ([@inkstak][]) diff --git a/changelog/fix_a_false_negative_for_rails_action_controller_test_case.md b/changelog/fix_a_false_negative_for_rails_action_controller_test_case.md deleted file mode 100644 index 1a36a0a35e..0000000000 --- a/changelog/fix_a_false_negative_for_rails_action_controller_test_case.md +++ /dev/null @@ -1 +0,0 @@ -* [#786](https://github.com/rubocop/rubocop-rails/issues/786): Fix a false negative for `Rails/ActionControllerTestCase` when extending `ActionController::TestCase` and having a method definition. ([@koic][]) diff --git a/changelog/fix_a_false_negative_for_rails_redundant_presence_validation_on_belongs_to.md b/changelog/fix_a_false_negative_for_rails_redundant_presence_validation_on_belongs_to.md deleted file mode 100644 index 67ea0b188c..0000000000 --- a/changelog/fix_a_false_negative_for_rails_redundant_presence_validation_on_belongs_to.md +++ /dev/null @@ -1 +0,0 @@ -* [#792](https://github.com/rubocop/rubocop-rails/issues/792): Fix a false negative for `Rails/RedundantPresenceValidationOnBelongsTo` when belongs_to at least one block and one hash like `belongs_to :company, -> { where(foo: true) }, inverse_of: :employee`. ([@PedroAugustoRamalhoDuarte][]) diff --git a/changelog/fix_a_false_positive_for_rails_dynamic_find_by.md b/changelog/fix_a_false_positive_for_rails_dynamic_find_by.md deleted file mode 100644 index 5d291e2529..0000000000 --- a/changelog/fix_a_false_positive_for_rails_dynamic_find_by.md +++ /dev/null @@ -1 +0,0 @@ -* [#781](https://github.com/rubocop/rubocop-rails/issues/781): Make `Rails/DynamicFindBy` aware of `find_by_token_for`. ([@koic][]) diff --git a/changelog/fix_an_error_for_rails_freeze_time.md b/changelog/fix_an_error_for_rails_freeze_time.md deleted file mode 100644 index 1523ee2c94..0000000000 --- a/changelog/fix_an_error_for_rails_freeze_time.md +++ /dev/null @@ -1 +0,0 @@ -* [#809](https://github.com/rubocop/rubocop-rails/issues/809): Fix an error for `Rails/FreezeTime` when using `travel_to` without argument. ([@koic][]) diff --git a/changelog/fix_an_error_for_rails_redundant_receiver_in_with_option.md b/changelog/fix_an_error_for_rails_redundant_receiver_in_with_option.md deleted file mode 100644 index 8c724b64eb..0000000000 --- a/changelog/fix_an_error_for_rails_redundant_receiver_in_with_option.md +++ /dev/null @@ -1 +0,0 @@ -* [#794](https://github.com/rubocop/rubocop-rails/issues/794): Fix an error for `Rails/RedundantReceiverInWithOptions` when calling a method with a receiver in `with_options` without block arguments. ([@koic][]) diff --git a/changelog/fix_an_incorrect_autocorrect_for_rails_eager_evaluation_log_message.md b/changelog/fix_an_incorrect_autocorrect_for_rails_eager_evaluation_log_message.md deleted file mode 100644 index 166d187134..0000000000 --- a/changelog/fix_an_incorrect_autocorrect_for_rails_eager_evaluation_log_message.md +++ /dev/null @@ -1 +0,0 @@ -* [#782](https://github.com/rubocop/rubocop-rails/issues/782): Fix an incorrect autocorrect for `Rails/EagerEvaluationLogMessage` when using `Style/MethodCallWithArgsParentheses`'s autocorrection together. ([@koic][]) diff --git a/changelog/fix_an_incorrect_autocorrect_for_rails_presence.md b/changelog/fix_an_incorrect_autocorrect_for_rails_presence.md deleted file mode 100644 index 2f6b8a0d1d..0000000000 --- a/changelog/fix_an_incorrect_autocorrect_for_rails_presence.md +++ /dev/null @@ -1 +0,0 @@ -* [#776](https://github.com/rubocop/rubocop-rails/issues/776): Fix an incorrect autocorrect for `Rails/Presence` when using arithmetic operation in `else` branch. ([@koic][]) diff --git a/changelog/fix_errors_that_occur_when_unrelated_tag.md b/changelog/fix_errors_that_occur_when_unrelated_tag.md deleted file mode 100644 index 98615c5320..0000000000 --- a/changelog/fix_errors_that_occur_when_unrelated_tag.md +++ /dev/null @@ -1 +0,0 @@ -* [#813](https://github.com/rubocop/rubocop-rails/pull/813): Fix errors that occur when unrelated `tag` is investigated by `Rails/ContentTag`. ([@r7kamura][]) diff --git a/changelog/fix_false_positive_for_action_controller_flash_before_render.md b/changelog/fix_false_positive_for_action_controller_flash_before_render.md deleted file mode 100644 index e8fe9a34c5..0000000000 --- a/changelog/fix_false_positive_for_action_controller_flash_before_render.md +++ /dev/null @@ -1 +0,0 @@ -* [#808](https://github.com/rubocop/rubocop-rails/issues/808): Fix false positive for `Rails/ActionControllerFlashBeforeRender` when `render` call precedes `flash` call. ([@americodls][]) diff --git a/changelog/fix_false_positive_for_rails_dynamic_find_by.md b/changelog/fix_false_positive_for_rails_dynamic_find_by.md deleted file mode 100644 index 39a0ab23c8..0000000000 --- a/changelog/fix_false_positive_for_rails_dynamic_find_by.md +++ /dev/null @@ -1 +0,0 @@ -* [#778](https://github.com/rubocop/rubocop-rails/issues/778): Fix a false positive for `Rails/DynamicFindBy` when using `page.find_by_id` as a Capybara testing API. ([@koic][]) diff --git a/changelog/fix_fix_an_incorrect_autocorrect_for_rails_presence.md b/changelog/fix_fix_an_incorrect_autocorrect_for_rails_presence.md deleted file mode 100644 index 1db7aff4d6..0000000000 --- a/changelog/fix_fix_an_incorrect_autocorrect_for_rails_presence.md +++ /dev/null @@ -1 +0,0 @@ -* [#816](https://github.com/rubocop/rubocop-rails/pull/816): Fix an incorrect autocorrect for `Rails/Presence` when a right-hand side of the relational operator. ([@ydah][]) diff --git a/changelog/new_action_order_cop.md b/changelog/new_action_order_cop.md deleted file mode 100644 index 39183660c2..0000000000 --- a/changelog/new_action_order_cop.md +++ /dev/null @@ -1 +0,0 @@ -* [#547](https://github.com/rubocop/rubocop-rails/pull/547): Add new `Rails/ActionOrder` cop. ([@mollerhoj][]) diff --git a/changelog/new_add_cop_where_not_with_multiple_conditions.md b/changelog/new_add_cop_where_not_with_multiple_conditions.md deleted file mode 100644 index 99e7b0a75f..0000000000 --- a/changelog/new_add_cop_where_not_with_multiple_conditions.md +++ /dev/null @@ -1 +0,0 @@ -* [#565](https://github.com/rubocop/rubocop-rails/issues/565): Add cop Rails/WhereNotWithMultipleConditions. ([@niklas-hasselmeyer][]) diff --git a/changelog/new_ignored_columns_assignment.md b/changelog/new_ignored_columns_assignment.md deleted file mode 100644 index c3e1f1fdd9..0000000000 --- a/changelog/new_ignored_columns_assignment.md +++ /dev/null @@ -1 +0,0 @@ -* [#771](https://github.com/rubocop/rubocop-rails/pull/771): Add new `Rails/IgnoredColumnsAssignment` cop. ([@fsateler][], [@kkitadate][]) diff --git a/changelog/new_make_style_hash_except_aware_of_target_ruby_version_2_x.md b/changelog/new_make_style_hash_except_aware_of_target_ruby_version_2_x.md deleted file mode 100644 index 83c62a347c..0000000000 --- a/changelog/new_make_style_hash_except_aware_of_target_ruby_version_2_x.md +++ /dev/null @@ -1 +0,0 @@ -* [#790](https://github.com/rubocop/rubocop-rails/issues/790): Make `Style/HashExcept` aware of TargetRubyVersion: 2.x because Rails has `Hash#except`. ([@koic][])