Releases: rubocop/rubocop-rails
Releases · rubocop/rubocop-rails
RuboCop Rails 2.7.1
Bug fixes
- #297: Handle an upstream Ruby issue where the DidYouMean module is not available, which would break the
Rails/UnknownEnv
cop. (@taylorthurlow) - #300: Fix
Rails/RenderInline
error on variable key in render options. (@tejasbubane) - #305: Fix crash in
Rails/MatchRoute
cop whenvia
option is a variable. (@tejasbubane)
Changes
RuboCop Rails 2.7.0
New features
- #283: Add new
Rails/FindById
cop. (@fatkodima) - #285: Add new
Rails/ActiveRecordCallbacksOrder
cop. (@fatkodima) - #276: Add new
Rails/RenderPlainText
cop. (@fatkodima) - #76: Add new
Rails/DefaultScope
cop. (@fatkodima) - #275: Add new
Rails/MatchRoute
cop. (@fatkodima) - #286: Add new
Rails/WhereExists
cop. (@fatkodima) - #271: Add new
Rails/RenderInline
cop. (@fatkodima) - #281: Add new
Rails/MailerName
cop. (@fatkodima) - #280: Add new
Rails/ShortI18n
cop. (@fatkodima) - #282: Add new
Rails/Inquiry
cop. (@fatkodima) - #246: Add new
Rails/PluckInWhere
cop. (@fatkodima) - #17: Add new
Rails/NegateInclude
cop. (@fatkodima) - #278: Add new
Rails/Pluck
cop. (@eugeneius) - #272: Add new
Rails/PluckId
cop. (@fatkodima)
Bug fixes
- #261: Fix auto correction for
Rails/ContentTag
whencontent_tag
is called with options hash and block. (@fatkodima)
Changes
RuboCop Rails 2.6.0
New features
- #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)
Bug fixes
- #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)
Changes
RuboCop Rails 2.5.2
RuboCop Rails 2.5.1
Bug fixes
- #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)
Changes
- #223: Mark
Rails/ApplicationController
,Rails/ApplicationJob
,Rails/ApplicationMailer
, andRails/ApplicationRecord
as unsafe autocorrect. (@hoshinotsuyoshi)
RuboCop Rails 2.5.0
New features
- #197: Add
Rails/UniqueValidationWithoutIndex
cop. (@pocke) - #208: Add new
Rails/IndexBy
andRails/IndexWith
cops. (@djudd, @eugeneius) - #150: Add
EnforcedStyle: refute
forRails/RefuteMethods
cop. (@koic)
Bug fixes
- #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)
RuboCop Rails 2.4.2
RuboCop Rails 2.4.1
RuboCop Rails 2.4.0
New features
- #123: Add new
Rails/ApplicationController
andRails/ApplicationMailer
cops. (@eugeneius) - #130: Add new
Rails/RakeEnvironment
cop. (@pocke) - #133: Add new
Rails/SafeNavigationWithBlank
cop. (@gyfis)
Bug fixes
- #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)