- #51: Add allowed receiver class names option for
Rails/DynamicFindBy
. (@tejasbubane) - #211: Add autocorrect to
Rails/RakeEnvironment
cop. (@tejasbubane) - #242: Add
Rails/ContentTag
cop. (@tabuchi0919) - #249: Add new
Rails/Pick
cop. (@eugeneius) - #257: Add new
Rails/RedundantForeignKey
cop. (@eugeneius)
- #12: Fix a false positive for
Rails/SkipsModelValidations
when passing a boolean literal totouch
. (@eugeneius) - #238: Fix auto correction for
Rails/IndexBy
when the.to_h
invocation is separated in multiple lines. (@diogoosorio) - #248: Fix a false positive for
Rails/SaveBang
whenupdate
is called onENV
. (@eugeneius) - #251: Fix a false positive for
Rails/FilePath
when the result ofRails.root.join
is interpolated at the end of a string. (@eugeneius) - #91: Fix
Rails/UniqBeforePluck
to not recommend usinguniq
inActiveRecord::Relation
s anymore since it was deprecated in Rails 5.0. (@santib, @ghiculescu)
- #233: (BREAKING) Drop support for Ruby 2.3. (@koic)
- #236: (BREAKING) Drop support for Rails 4.1 or lower. (@koic)
- #210: Accept
redirecto_to(...) and return
and similar cases. (@koic) - #258: Drop support for RuboCop 0.81 or lower. (@koic)
- #213: Fix a false positive for
Rails/UniqueValidationWithoutIndex
when using conditions. (@sunny) - #215: Fix a false positive for
Rails/UniqueValidationWithoutIndex
when using Expression Indexes. (@koic) - #214: Fix an error for
Rails/UniqueValidationWithoutIndex
when a table has no column definition. (@koic) - #221: Make
Rails/UniqueValidationWithoutIndex
aware ofadd_index
in db/schema.rb. (@koic)
- #223: Mark
Rails/ApplicationController
,Rails/ApplicationJob
,Rails/ApplicationMailer
, andRails/ApplicationRecord
as unsafe autocorrect. (@hoshinotsuyoshi)
- #197: Add
Rails/UniqueValidationWithoutIndex
cop. (@pocke) - #208: Add new
Rails/IndexBy
andRails/IndexWith
cops. (@djudd, @eugeneius) - #150: Add
EnforcedStyle: refute
forRails/RefuteMethods
cop. (@koic)
- #180: Fix a false positive for
HttpPositionalArguments
when usingget
method with:to
option. (@koic) - #193: Make
Rails/EnvironmentComparison
aware ofRails.env
is used in RHS or when!=
is used for comparison. (@koic) - #205: Make
Rails/ReversibleMigration
aware of:to_table
option ofremove_foreign_key
. (@joshpencheon) - #207: Fix a false positive for
Rails/RakeEnvironment
when using Capistrano. (@sinsoku)
- #184: Fix
Rake/Environment
to allow task with no block. (@hanachin) - #122: Fix
Exclude
paths that were not inherited. (@koic) - #187: Fix an issue that excluded files in rubocop-rails did not work. (@sinsoku)
- #190: Fix
Rails/SaveBang
when return value is checked immediately. (@jas14)
- #170: Make
Rails/BulkChangeTable
not suggest combining methods with an intervening block. (@mvz) - #159: Fix autocorrect for
Rails/EnumHash
when using % arrays notations. (@ngouy)
- #123: Add new
Rails/ApplicationController
andRails/ApplicationMailer
cops. (@eugeneius) - #130: Add new
Rails/RakeEnvironment
cop. (@pocke) - #133: Add new
Rails/SafeNavigationWithBlank
cop. (@gyfis)
- #120: Fix message for
Rails/SaveBang
when the save is in the body of a conditional. (@jas14) - #131: Fix an incorrect autocorrect for
Rails/Presence
when using[]
method. (@forresty) - #142: Fix an incorrect autocorrect for
Rails/EnumHash
when using nested constants. (@koic) - #136: Fix a false positive for
Rails/ReversibleMigration
when usingchange_default
with:from
and:to
options. (@sinsoku) - #144: Fix a false positive for
Rails/ReversibleMigration
when usingchange_table_comment
orchange_column_comment
with a:from
and:to
hash. (@DNA)
- #156: Make
Rails/UnknownEnv
cop aware ofRails.env == 'unknown_env'
. (@pocke) - #141: Change default of
EnforcedStyle
fromarguments
toslashes
forRails/FilePath
. (@koic)
- #118: Fix an incorrect autocorrect for
Rails/Validation
when attributes are specified with array literal. (@koic) - #116: Fix an incorrect autocorrect for
Rails/Presence
whenelse
branch of ternary operator is not nil. (@koic)
- #104: Exclude Rails-independent
bin/bundle
by default. (@koic) - #107: Fix style guide URLs when specifying
rubocop --display-style-guide
option. (@koic) - #111: Fix an incorrect autocorrect for
Rails/Presence
when method arguments ofelse
branch is not enclosed in parentheses. (@koic)
- #78: Add new
Rails/EnumHash
cop. (@fedeagripa, @brunvez, @santib)
- #53: Fix a false positive for
Rails/SaveBang
when implicitly return using finder method and creation method connected by||
. (@koic) - #97: Fix two false negatives for
Rails/EnumUniqueness
. 1. Whenenum
name is not a literal. 2. Whenenum
has multiple definitions. (@santib)
- #98: Mark
Rails/ActiveRecordAliases
asSafeAutoCorrect
false and disable autocorrect by default. (@prathamesh-sonpatki) - #101: Mark
Rails/SaveBang
asSafeAutoCorrect
false and disable autocorrect by default. (@prathamesh-sonpatki) - #102: Include
create_or_find_by
inRails/SaveBang
cop. (@MaximeLaurenty)
- #43: Remove
change_column_null
method fromBulkChangeTable
cop offenses. (@anthony-robin) - #79: Fix
RuboCop::Cop::Rails not defined (NameError)
. (@rmm5t)