- #1390: Fix an incorrect autocorrect for
Rails/SelectMap
whenselect
has no receiver and method chains are used. (@masato-bkn) - #1382: Fix false negatives for
Rails/RedundantActiveRecordAllMethod
when usingall
method in block. (@masato-bkn) - #1397: Fix
Rails/FilePath
cop error onjoin
method with implicit receiver. (@viralpraxis) - #1398: Fix
Rails/FilePath
cop error in case of extra operations inRails.root
interpolation. (@viralpraxis) - #1392: Fix
Rails/FilePath
cop error with rescuedRails.root
. (@viralpraxis)
- #1388: Modify
Rails/Pluck
to ignoremap/collect
when used inside blocks to prevent potential N+1 queries. (@masato-bkn)
- #1377: Fix an error for
Rails/EnumSyntax
when positional arguments are used and options are not passed as keyword arguments. (@koic) - #1367: Fix
Rails/TimeZone
should not report offense onString#to_time
with timezone specifier. (@armandmgt)
- #727: Disable
Rails/TransactionExitStatement
on Rails >= 7.2. (@earlopain) - #1374: Change
Rails/EnvLocal
to handle negated conditions. (@fatkodima) - #1195: Change
Rails/SelectMap
to handle safe navigation operators. (@fatkodima)
- #1362: Fix false positives for
Rails/EnumSyntax
when using Ruby 2.7. (@koic) - #1269: Fix false positives for
Rails/ActionControllerFlashBeforeRender
in combination with implicit returns. (@earlopain) - #1326: Fix wrong autocorrect for
Rails/FilePath
when passing an array toFile.join
. (@earlopain)
- #1359: Support
filter
inRails/CompactBlank
. (@masato-bkn)
- #1343: Fix false negatives for
Rails/EnumSyntax
for non-literal mappings. (@earlopain) - #1340: Fix a false positive for
Rails/WhereEquals
,Rails/WhereNot
, andRails/WhereRange
when qualifying the database name. (@earlopain)
- #1342: Change
Rails/ApplicationRecord
to ignore migrations. (@fatkodima) - #1350: Change
Rails/EnumSyntax
to autocorrect underscored options. (@fatkodima)
- #1238: Add new
Rails/EnumSyntax
cop. (@maxprokopiev, @koic) - #1309: Support Rails 7 syntax for
Rails/EnumHash
cop. (@ytjmt) - #1298: Support Rails 7 syntax for
Rails/EnumUniqueness
cop. (@ytjmt)
- #1335: Fix an error for
Rails/BulkChangeTable
when the block forchange_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 usingcollection.reject!
. (@koic) - #1319: Fix a false positive for
Rails/RedundantPresenceValidationOnBelongsTo
when removingpresence
would leave other non-validation options likeallow_blank
without validations. (@earlopain) - #1306: Make
Rails/PluralizationGrammar
aware of byte methods. (@earlopain) - #1302: Allow
params
receiver by default forStyle/CollectionMethods
. (@koic) - #1321: Fix an error for
Rails/WhereEquals
when the second argument is not yet typed (where("foo = ?", )
). (@earlopain)
- #1308: Change
Rails/CompactBlank
to handleselect(&:present?)
. (@fatkodima) - #1303: Change
Rails/IgnoredSkipActionFilterOption
to handle multiple callbacks. (@fatkodima) - #1199: Make
Rails/WhereEquals
aware ofwhere.not(...)
. (@earlopain) - #1003: Change
Rails/RootPathnameMethods
to detect offenses onDir.[]
. (@r7kamura)
- #1280: Look for change_column_null for
Rails/BulkChangeTable
. (@ccutrer) - #1299: Fix an error for
Rails/NotNullColumn
when the block forchange_table
is empty. (@earlopain) - #1281: Fix
Rails/WhereRange
autocorrect for complex expressions. (@fatkodima) - #1282: Fix
Rails/WhereRange
to correctly handle template strings with extra spaces. (@fatkodima)
- #1295: Cover validates_comparison_of in
Rails/Validation
. (@ChaelCodes) - #1288: Let
Rails/LinkToBlank
look intolink_to_if
andlink_to_unless
, too. (@fwolfst) - #1286: Mark
Rails/SkipsModelValidations
as unsafe. (@koic) - #1283: Mark
Rails/WhereRange
as unsafe autocorrect. (@fatkodima)
- #1272: Add new
Rails/WhereRange
cop. (@fatkodima)
- #1270: Fix an incorrect autocorrect for
Rails/Validation
when usingvalidates_size_of
. (@koic) - #1278: Fix a false positive for
Rails/SkipsModelValidations
when usinginsert
orinsert!
with a safe navigator. (@tldn0718) - #1260: Fix a performance regression caused by
Rails/UnknownEnv
when using Rails 7.1. (@lukasfroehlich1)
- #1249: Disable
Rails/UnusedIgnoredColumns
by default. (@earlopain) - #1266: Check
change_table
calls for offenses. (@ccutrer) - #1267: Make
Rails/HttpStatus
aware of Rails-specific response assertions. (@tldn0718) - #1137: Migrate to
TargetRailsVersion
the newrequires_gem
API. (@amomchilov)
- #1244: Fix a false positive for
Rails/ActionControllerFlashBeforeRender
when returningredirect_to
. (@earlopain) - #1255: Fix an error for
Rails/UniqBeforePluck
withEnforcedStyle: aggressive
when no receiver. (@earlopain) - #1247: Fix an error for
Rails/UnusedIgnoredColumns
when without tables in db/schema.rb. (@koic) - #1253: Fix an error for
Rails/WhereMissing
with leadingwhere
without receiver. (@earlopain) - #1254: Fix an error for
Rails/ExpandedDateRange
when passing an argument only to the first method call for weeks. (@earlopain) - #1256: Fix an error for
Rails/ActiveSupportOnLoad
when calling without arguments. (@earlopain) - #1230: Fix a false positive for
Rails/SaveBang
ifpersisted?
is checked on parenthesised expression. (@earlopain) - #1200: Make
Rails/TimeZone
aware of safe navigation. (@earlopain)
- #1257: Add Rails 7.1 load hooks and
active_record_sqlite3adapter
toRails/ActiveSupportOnLoad
. (@earlopain)
- #1234: Fix an incorrect autocorrect for
Rails/FindBy
when using multi-line leading dot method calls. (@ymap) - #1241: Fix an error for
Rails/WhereExists
withEnforcedStyle: where
and implicit receivers. (@earlopain)
- #1229: Make
Rails/EnvironmentVariableAccess
aware of initializers. (@markokajzer) - #1231: Remove
object_id
fromRails/DangerousColumnNames
targets. (@r7kamura)
- #1221: Fix an exception in
Rails/WhereNot
when calling.where
on an implicit receiver (e.g. inside model code). (@bquorning)
- #1183: Support PostGIS adapter for PostgreSQL. (@Dania02525)
- #1206: Fix an error for
Rails/WhereMissing
where join method is called without arguments. (@fatkodima) - #1189: Fix false negatives for
Rails/Pluck
when using safe navigation method calls. (@koic) - #1204: Make
Rails/ActiveSupportAliases
,Rails/FindBy
,Rails/FindById
,Rails/Inquiry
,Rails/Pick
Rails/PluckId
,Rails/PluckInWhere
,Rails/WhereEquals
,Rails/WhereExists
, andRails/WhereNot
cops aware of safe navigation operator. (@koic)
- #1213: Update
Rails/PluckInWhere
to check for.ids
call. (@fatkodima) - #1181: Support
Nokogiri::HTML.parse
andNokogiri::HTML5.parse
onRails/ResponseParsedBody
. (@r7kamura) - #1198: Support
where.not
forRails/PluckInWhere
. (@fatkodima)
- #1172: Fix an error for
Rails/UnknownEnv
when using Rails 7.1. (@koic) - #1173: Fix an error for
Rails/RedundantActiveRecordAllMethod
cop when used with RuboCop 1.51 or lower. (@koic)
- #1171: Change
Rails/RedundantActiveRecordAllMethod
to ignoredelete_all
anddestroy_all
when receiver is an association. (@masato-bkn) - #1178: Require RuboCop AST 1.30.0+. (@koic)
- #1145: Fix a false positive for
Rails/DuplicateAssociation
when using duplicatebelongs_to
associations of same class without other arguments. (@koic)
- #906: Add
Rails/EnvLocal
cop. (@sambostock) - #1128: Make
Rails/DuplicateAssociation
aware of duplicateclass_name
. (@koic) - #1157: Support some Rails 7.1's new querying methods for
Rails/RedundantActiveRecordAllMethod
. (@koic) - #1147: Support the Trilogy adapter for MySQL. (@koic)
- #952: Fix a false positive for
Rails/NotNullColumn
when usingnull: false
for MySQL's TEXT type. (@koic) - #1041: Fix a false positive for
Rails/Output
when output method is called with block argument. (@koic) - #1143: Fix an error for
Rails/RedundantActiveRecordAllMethod
when using RuboCop 1.51 or lower. (@koic) - #1105: Fix false positives for
Rails/RedundantPresenceValidationOnBelongsTo
when usingvalidates
with:if
or:unless
options. (@koic) - #1158:
Rails/HasManyOrHasOneDependent
does not add offence when has_many or has_one is called on an explicit receiver. (@samrjenkins) - #1160: Fix
Rails/SaveBang
to ignore parenthesis. (@fatkodima)
- #1152: Add more dangerous column names to
Rails/DangerousColumnNames
. (@r7kamura) - #1039: Deprecate
Rails/ActionFilter
cop; it will be disabled by default. (@koic) - #893: Support
local
as an environment forRails/UnknownEnv
from Rails 7.1 onward. (@ghiculescu)
- #1126: Fix a false positive for
Rails/RedundantActiveRecordAllMethod
when using someEnumerable
's methods with block argument. (@koic) - #1121: Fix an error for
Rails/SelectMap
when usingselect(:column_name).map(&:column_name)
without receiver model. (@koic) - #1119: Fix an incorrect autocorrect for
Rails/RedundantActiveRecordAllMethod
whenall
has parentheses. (@masato-bkn) - #1130: Fix crash for
Rails/UniqueValidationWithoutIndex
with bare validate. (@jamiemccarthy) - #1124: Fix false positives for
Rails/RedundantActiveRecordAllMethod
when receiver is not an Active Record model. (@koic)
- #1108: Fix an incorrect autocorrect for
Rails/TimeZone
when usingString#to_time
. (@koic) - #1109: Fix error for
Rails/RedundantActiveRecordAllMethod
whenall
is an argument for AR methods. (@masato-bkn) - #1110: Fix false positive for
Rails/RedundantActiveRecordAllMethod
whenall
has any parameters. (@masato-bkn)
- #1075: Add new
Rails/SelectMap
cop that checks for uses ofselect(:column_name)
withmap(&:column_name)
. (@koic) - #158: Add
Rails/DangerousColumnNames
cop. (@r7kamura) - #1072: Add
TransactionMethods
config forRails/TransactionExitStatement
to detect custom transaction methods. (@marocchino) - #967: Add new
Rails/UnusedRenderContent
cop. (@samrjenkins) - #1052: Add explicit style to
Rails/I18nLazyLookup
. (@sunny) - #1016: Add new
Rails/RedundantActiveRecordAllMethod
cop. (@masato-bkn)
- #1078: Fix a false negative for
Rails/LexicallyScopedActionFilter
when no methods are defined. (@vlad-pisanov) - #1060: Fix a false positive for
Rails/HttpStatus
when using symbolic value that have no numeric value mapping. (@koic) - #1004: Fix a false-positive for
Rails/RootPathnameMethods
on Ruby 2.4 or lower. (@r7kamura) - #1066: Fix an error for
Rails/FilePath
when string interpolatedRails.root
is followed by a message starting with.
. (@koic) - #1049: Fix an incorrect autocorrect for
Rails/FilePath
when File.join with Rails.root and path starting with/
. (@ydah) - #1045: Fix an incorrect autocorrect for
Rails/NegateInclude
when usingStyle/InverseMethods
's autocorrection together. (@koic) - #1062: Fix autocorrection for
Rails/RakeEnvironment
when rake task accepts arguments. (@fastjames) - #1036: Fix an error for
UniqueValidationWithoutIndex
whendb/schema.rb
is empty. (@fatkodima) - #1042: Fix no offences for
Rails/SchemaComment
when create_table with multi t columns. (@nipe0324)
- #1056: Fix database adapter detection for nested config. (@mjankowski)
- #1031: Make
Lint/SafeNavigationChain
allowpresence_in
. (@koic) - #1080: Make
Rails/HttpStatus
aware of string number status. (@r7kamura) - #1094: Make
Rails/TimeZone
aware ofString#to_time
. (@koic) - #1015: Make
Style/InvertibleUnlessCondition
aware of Active Support methods. (@koic) - #903: Read database config for
Rails/BulkChangeTable
from environment variable. (@joergschiller) - #1058: Relax
Include
path forRails/FindBy
andRails/FindEach
. (@koic) - #994: Restrict DuplicateAssociation cop to ActiveRecord. (@mjankowski)
- #1028: Fix an error for
Rails/UniqueValidationWithoutIndex
when thepresence: true
option is used alone for thevalidates
method. (@koic)
- #999: Add autocorrection for
Rails/Date
. (@r7kamura) - #991: Add autocorrection for
Rails/FilePath
. (@r7kamura) - #988: Add autocorrection for
Rails/IgnoredSkipActionFilterOption
. (@r7kamura)
- #1005: Flag
break
inwith_lock
forRails/TransactionExitStatement
. (@splattael) - #997: Fix to Allow
NotNullColumn
to work with method calls and variables. (@fidalgo) - #989: Fix
Rails/FilePath
to detect offenses from complex string interpolation. (@r7kamura) - #1010: Fix
Rails/ThreeStateBooleanColumn
for dynamic tables/columns. (@fatkodima) - #1008: Fix
UniqueValidationWithoutIndex
to not detect offenses when a validation specifiesuniqueness: false
. (@samrjenkins)
- #1011: Add
*_create_active_storage_variant_records.active_storage.rb
toRails/CreateTableWithTimestamps
exclude file list. (@tka5) - #995: Check for
or
method inRails/FindEach
cop. (@masato-bkn) - #1019: Change db migration file pattern so that it supports multiple db. (@r7kamura)
- #986: (Breaking) Drop Ruby 2.6 support. (@koic)
- #992: Exclude
app/assets/**/*
by default. (@r7kamura) - #1014: Make
Lint/RedundantSafeNavigation
aware ofpresence
andpresent?
methods. (@koic) - #1007: Support
flash.now
forRails/I18nLocaleTexts
. (@fatkodima)
- #337: Add new
Rails/ThreeStateBooleanColumn
cop. (@fatkodima) - #45: Make
Rails/Delegate
aware ofself
. (@koic)
- #934: Fix a false negative for
Rails/Output
when print methods without arguments. (@koic) - #99: Fix a false positive for
Rails/HttpPositionalArguments
when usinginclude Rack::Test::Methods
. (@koic) - #501: Fix a false positive for
Rails/OutputSafety
when usinghtml_safe
forI18n
methods. (@koic) - #860: Fix a false positive for
Rails/Pluck
when using regexp literal key forString#[]
. (@koic) - #938: Fix an error for
Rails/WhereNotWithMultipleConditions
when usingwhere.not.lt(condition)
as a Mongoid API'. (@koic) - #941: Remove redundant config for
Style/InverseMethods
. (@koic)
- #299: Add autocorrection for
Rails/ReflectionClassName
. (@tejasbubane) - #34: Allow
CreateTableWithTimestamps
when usingid: false
and not includetimestamps
. (@koic) - #694: Mark
Rails/FindEach
as unsafe. (@koic) - #940: Mark
Rails/ResponseParsedBody
as unsafe. (@koic)
- #824: Fix a false negative for
Rails/ActionControllerTestCase
when the class is namespaced. (@vlad-pisanov) - #909: Fix a false positive for
Rails/ActionControllerFlashBeforeRender
when usingflash
beforeredirect_to
inif
branch. (@koic) - #898: Fix a false positive for
Rails/ActiveRecordAliases
when arguments ofupdate_attributes
is empty. (@koic) - #920: Fix an error for
Rails/NegateInclude
when there is no receiver. (@fatkodima) - #931: Fix error in
Rails/Presence
when ternary operators are used in multiple lines. (@r7kamura) - #687: Fix
Rails/HasManyOrHasOneDependent
to correctly handle association methods with receiver. (@fatkodima) - #929: Prevent
Rails/SquishedSQLHeredocs
applying when single-line comments are present. (@john-h-k) - #887: Fix a false positive for
Rails/NotNullColumn
when adding a:virtual
column. (@fatkodima) - #918: Fix
Rails/FreezeTime
running against Rails < 5.2 apps. (@DRBragg) - #895: Fix
Rails/UnusedIgnoredColumns
not recognizing columns added via+=
. (@lucthev)
- #263: Accept actions defined via
alias
inRails/LexicallyScopedActionFilter
. (@fatkodima) - #902: Ignore
redirect
method forStyle/FormatStringToken
by default. (@javierjulio) - #935: Make
Style/InverseMethods
aware of Active Support'spresent?
,blank?
,include?
, andexclude?
methods. (@koic) - #914: Make
Style/InverseMethods
aware ofvalid?
andinvalid?
methods. (@koic) - #826: Mark
Rails/Pluck
as unsafe. (@fatkodima) - #896: Raise severity of
Rails/ActiveRecordOverride
,Rails/DeprecatedActiveModelErrorsMethods
,Rails/DuplicateAssociation
,Rails/DuplicateScope
,Rails/TopLevelHashWithIndifferentAccess
, andRails/WhereNotWithMultipleConditions
cops to warning. (@koic)
- #870: Fix an error for
Rails/RootPathnameMethods
when usingRails.env
argument withinDir.glob
. (@koic) - #881: Fix a false positive for
Rails/ActionControllerFlashBeforeRender
when usingflash
in multilinerescue
branch beforeredirect_to
. (@gurix) - #871: Fix a false positive for
Rails/WhereMissing
whenleft_joins(:foo)
andwhere(foos: {id: nil})
separated byor
,and
. (@ydah) - #875: Make
Rails/RootPathnameMethods
aware of enforced style ofStyle/StringLiterals
. (@koic) - #882: Fix false positive for
Rails/UniqueValidationWithoutIndex
with :conditions option. (@etiennebarrie) - #821: Enhance
Rails/TimeZone
to accept methods with the:in
timezone option. (@fatkodima)
- #880: Add
Rails/I18nLocaleTexts
match for redirect_back. (@bensheldon)
- #843: Fix a false positive for
Rails/ActionControllerFlashBeforeRender
when usingflash
in multilineif
branch beforeredirect_to
. (@koic) - #841: Fix an error for
Rails/ActionOrder
when using unconventional order of multiple actions. (@koic) - #838: Fix an incorrect autocorrect for
Rails/ActionOrder
when using unconventional order of actions in conditions. (@koic) - #867: Fix autocorrection bug when
::Hash
is used onRails/IndexBy
andRails/IndexWith
. (@r7kamura) - #848: Fix a false positive for
Rails/FreezeTime
when usingtravel_to
with an argument ofTime.new(...).in_time_zone
. (@koic) - #869: Fix false-positives that non Rails formats are offended on
Rails/ToSWithArgument
. (@r7kamura) - #866: Fix false-positives when constant is used with receiver on
Rails/DurationArithmetic
,Rails/IndexBy
,Rails/IndexWIth
, andRails/RequireDependency
. (@r7kamura) - #850: Fix default configuration for
Rails/I18nLazyLookup
. (@vlad-pisanov) - #837: Fix incorrect autocorrection of
Rails/ActionOrder
about comments. (@r7kamura) - #855: Fix Rails/RootPathnameMethods autocorrection for Pathname calls without parens. (@gsamokovarov)
- #868: Support
::
prefixed constants onRails/ActionControllerFlashBeforeRender
,Rails/ActionControllerTestCase
,Rails/ApplicationController
,Rails/ApplicationJob
,Rails/ApplicationMailer
,Rails/ApplicationRecord
,Rails/DotSeparatedKeys
,Rails/DynamicFindBy
,Rails/FindEach
,Rails/FreezeTime
,Rails/HasManyOrHasOneDependent
,Rails/HelperInstanceVariable
,Rails/MailerName
,Rails/MigrationClassName
,Rails/Output
,Rails/ReversibleMigrationMethodDefinition
,Rails/ReversibleMigration
,Rails/ShortI18n
,Rails/SkipsModelValidations
, andRails/TimeZoneAssignment
. (@r7kamura) - #865: Support
::Rails
and::File
onRails/FilePath
cop. (@r7kamura)
- #825: Fix a false positive for
Rails/ActionControllerFlashBeforeRender
when using condition beforeredirect_to
. (@koic) - #833: Fix a false positive for
Rails/Pluck
when receiver is not block argument for[]
. (@koic) - #834: Fix an error for
Rails/WhereNotWithMultipleConditions
when usingwhere.not
with empty hash literal. (@koic) - #833: Fix a false positive for
Rails/Pluck
when using multiple block arguments. (@koic)
- #832: Mark
Rails/ActionControllerFlashBeforeRender
,Rails/ActionControllerTestCase
, andRails/RootPathnameMethods
cops as unsafe autocorrection. (@koic)
- #829: Revert "Extends
Rails/HttpStatus
cop to checkroutes.rb
" introduced in 2.17.0. (@jdufresne) - #831: Fix a false positive for
Rails/Pluck
when using block argument in[]
. (@koic)
- #547: Add new
Rails/ActionOrder
cop. (@mollerhoj) - #565: Add cop Rails/WhereNotWithMultipleConditions. (@niklas-hasselmeyer)
- #771: Add new
Rails/IgnoredColumnsAssignment
cop. (@fsateler, @kkitadate) - #790: Make
Style/HashExcept
aware of TargetRubyVersion: 2.x because Rails hasHash#except
. (@koic)
- #786: Fix a false negative for
Rails/ActionControllerTestCase
when extendingActionController::TestCase
and having a method definition. (@koic) - #792: Fix a false negative for
Rails/RedundantPresenceValidationOnBelongsTo
when belongs_to at least one block and one hash likebelongs_to :company, -> { where(foo: true) }, inverse_of: :employee
. (@PedroAugustoRamalhoDuarte) - #781: Make
Rails/DynamicFindBy
aware offind_by_token_for
. (@koic) - #809: Fix an error for
Rails/FreezeTime
when usingtravel_to
without argument. (@koic) - #794: Fix an error for
Rails/RedundantReceiverInWithOptions
when calling a method with a receiver inwith_options
without block arguments. (@koic) - #782: Fix an incorrect autocorrect for
Rails/EagerEvaluationLogMessage
when usingStyle/MethodCallWithArgsParentheses
's autocorrection together. (@koic) - #776: Fix an incorrect autocorrect for
Rails/Presence
when using arithmetic operation inelse
branch. (@koic) - #813: Fix errors that occur when unrelated
tag
is investigated byRails/ContentTag
. (@r7kamura) - #808: Fix false positive for
Rails/ActionControllerFlashBeforeRender
whenrender
call precedesflash
call. (@americodls) - #778: Fix a false positive for
Rails/DynamicFindBy
when usingpage.find_by_id
as a Capybara testing API. (@koic) - #816: Fix an incorrect autocorrect for
Rails/Presence
when a right-hand side of the relational operator. (@ydah)
- #779: Add
mail
toAllowedMethods
ofStyle/SymbolProc
. (@koic) - #796: Add several directories to
Exclude
to prevent slow investigation. (@koic) - #822: Extends
Rails/HttpStatus
cop to checkroutes.rb
. (@anthony-robin) - #787: Make
Rails/Pluck
aware of all keys. (@koic) - #800: Make
Rails/TimeZone
aware of timezone UTF offset. (@inkstak)
- #769: Fix a false positive for
Rails/FreezeTime
when usingtravel_to
with an argument ofDateTime.new
with arguments. (@koic) - #772: Fix a false positive for
Rails/TopLevelHashWithIndifferentAccess
when usingHashWithIndifferentAccess
under namespace module. (@koic) - #762: Fix an error for
Rails/FreezeTime
when usingtravel_to
with an argument ofcurrent
method without receiver. (@koic) - #764: Fix an incorrect autocorrect for
Rails/FreezeTime
when usingtravel_to
with an argument of the current time and proc argument. (@koic) - #763: Mark
Rails/RootPathnameMethods
as unsafe and fix an incorrect autocorrect when usingDir.glob
. (@koic)
- #714: Add new
Rails/FreezeTime
cop. (@ydah) - #744: Add new
Rails/WhereMissing
cop. (@ydah) - #587: Add new
Rails/RootPathnameMethods
cop. (@leoarnold) - #752: Add
Rails/TopLevelHashWithIndifferentAccess
cop. (@r7kamura) - #759: Add new
Rails/ActionControllerFlashBeforeRender
cop. (@americodls) - #749: Add new
Rails/ActiveSupportOnLoad
cop. (@bdewater) - #747: Add
Rails/ToSWithArgument
cop. (@r7kamura) - #746: Enable
ActiveSupportExtensionsEnabled
option by default. (@koic)
- #757: Fix a false positive for
Rails/ReflectionClassName
when using Ruby 3.1's hash shorthand syntax. (@koic) - #741: Fix a bad autocorrection for
errors.details[:name] << value
in Rails/DeprecatedActiveModelErrorsMethods. (@BrianHawley) - #742: Rails/DeprecatedActiveModelErrorsMethods was missing the deprecated
values
,to_h
, andto_xml
methods. (@BrianHawley) - #740: Fix a NoMethodError on nil for
errors.keys
in a model in Rails/DeprecatedActiveModelErrorsMethods. (@BrianHawley) - #753: Fix
Rails/CompactBlank
bug when offense is found in block. (@r7kamura) - #756: Fix incorrect documentation URLs when using
rubocop --show-docs-url
. (@r7kamura) - #754: Make
Rails/RedundantReceiverInWithOptions
andRails/ReversibleMigration
cops aware of numbered block parameter. (@koic)
- #750: Deprecate
IgnoredMethods
option in integrate toAllowedMethods
andAllowedPatterns
option. (@koic) - #729: Change the minimum required
rubocop
dependency version to 1.31.0. (@pirj)
- #712: Fix false negative in
Rails/Delegate
when preceding nested class declares private or protected methods. (@Darhazer) - #737: Fix a false positive for
Rails/DeprecatedActiveModelErrorsMethods
when usingkeys
method with Rails 6.0. (@koic) - #737: Make
Rails/ExpandedDateRange
awarebeginning_of_week
with an argument. (@koic) - #731: Fix an incorrect autocorrect for
Rails/StripHeredoc
. (@kazarin)
- #723: Fix include value in
Rails/AttributeDefaultBlockValue
. (@kkitadate) - #717: Fix an error for
Rails/DeprecatedActiveModelErrorsMethods
when root receiver is a variable. (@koic) - #719: Fix a false negative for
Rails/FormattedS
when using safe navigation operator. (@koic) - #725: Fix an incorrect autocorrect for
Rails/DotSeparatedKeys
when a key starts with dot. (@koic)
- #325: Add new
Rails/DotSeparatedKeys
cop. (@fatkodima) - #704: Add new
Rails/StripHeredoc
cop. (@koic) - #691: Add new
Rails/ToFormattedS
cop. (@koic) - #588: Add new
Rails/RootPublicPath
cop. (@leoarnold) - #702: Make
keys
method aware ofRails/DeprecatedActiveModelErrorsMethods
cop. (@koic) - #688: Support autocorrection for
Rails/DeprecatedActiveModelErrorsMethods
. (@koic)
- #696: Fix a false negative for
Rails/TransactionExitStatement
whenreturn
is used inrescue
. (@koic) - #700: Fix a false positive for
Rails/FilePath
when a list of paths separated by colon including Rails.root. (@tk0miya) - #680: Fix a false positive for
Rails/ReversibleMigrationMethodDefinition
when using an inner class. (@koic) - #692: Fix an error for
Rails/UnusedIgnoredColumns
when using no tables db/schema.rb. (@koic) - #707: Fix an error when a variable is passed to has_many or has_one with double splat. (@nobuyo)
- #695: Fixes a false negative where the
in_rescue?
check would bypass situations where the return was inside a transaction but outside of a rescue. (@dorkrawk) - #703: Fix not autocorrected for
Rails/DuplicateAssociation
. (@ydah) - #708: Recover Ruby 2.2 code analysis using
TargetRubyVersion: 2.2
. (@koic)
- #697: (Compatibility) Drop Ruby 2.5 support. (@koic)
- #705: Add mailers to default
filter
/action
callbacks cops. (@ojab) - #710: Rails/TransactionExitStatement - Inspect
ActiveRecord::Locking::Pessimistic#with_lock
too, as#with_lock
opens a transaction. (@FunnyHector)
- #660: Fix a false positive for
Rails/MigrationClassName
when defining another class. (@koic) - #664: Fix a false positive for
Rails/MigrationClassName
whenActiveSupport::Inflector
is applied to the class name and the case is different. (@koic) - #658: Fix a false positive for
Rails/TransactionExitStatement
whenbreak
is used inloop
in transactions. (@koic) - #666: Fix an error for
Rails/TransactionExitStatement
when transaction block is empty. (@koic) - #673: Fix a false negative for
Rails/TransactionExitStatement
whenreturn
orthrow
is used in a block in transactions. (@Tietew) - #669: Fix a false positive for
Rails/TransactionExitStatement
whenreturn
is used inrescue
. (@koic)
- #656: Ignore gem name in paths for
Rails/MigrationClassName
. (@sunny) - #657: Only consider migration classes for
Rails/MigrationClassName
. (@sunny)
- #624: Add new
Rails/I18nLocaleTexts
cop. (@fatkodima) - #326: Add new
Rails/I18nLazyLookup
cop. (@fatkodima) - #644: Add new
Rails/MigrationClassName
cop. (@johnny-miyake) - #599: Add new
Rails/DuplicateAssociation
cop. (@natematykiewicz) - #427: Add
Rails/DuplicateScope
cop. (@natematykiewicz) - #642: New cop
Rails/TransactionExitStatement
to disallowreturn
,break
andthrow
in transactions. (@teckwan) - #491: New
Rails/DeprecatedActiveModelErrorsMethods
cop. (@lulalala) - #638: Add new
Rails/ActionControllerTestCase
cop. (@gmcgibbon) - #574: Add new
Rails/TableNameAssignment
cop. (@MaximeDucheneS)
- #636: Fix a false positive for
Rails/ContentTag
when usingtag
method in config/puma.rb. (@koic) - #635: Handle
t.remove
with multiple columns inRails/BulkChangeTable
. (@eugeneius)
- #646: Exclude db/schema.rb and db/[CONFIGURATION_NAMESPACE]_schema.rb by default. (@koic)
- #650: Make
Rails/CompactBlank
aware ofdelete_if(&:blank)
. (@koic) - #631: Update
Rails/Pluck
to be aware of numblocks. (@sammiya)
- #614: Add
IgnoreScopes
config option forRails/InverseOf
cop. (@composerinteralia)
- #620: Fix a false positive for
Rails/RedundantPresenceValidationOnBelongsTo
using presence with a message. (@koic) - #626: Fix a false positive for
Rails/CompactBlank
when using the receiver ofblank?
is not a block variable. (@koic) - #622: Add
month(s)
andyear(s)
toRails/DurationArithmetic
cop. (@agrobbin) - #623: Fix method shadowing check for
Rails/ReadWriteAttribute
cop. (@nvasilevski)
- #615: Change
Rails/RedundantPresenceValidationOnBelongsTo
toSafeAutoCorrect: false
. (@TonyArra) - #463: Support multiple databases for
ReversibleMigration
andReversibleMigrationMethodDefinition
cops. (@fatkodima)
- #601: Handle ignored_columns from mixins for
Rails/UnusedIgnoredColumns
cop. (@tachyons) - #603: Fix autocorrection of multiple attributes for
Rails/RedundantPresenceValidationOnBelongsTo
cop. (@pirj) - #608: Fix autocorrection of strict validation for
Rails/RedundantPresenceValidationOnBelongsTo
cop. (@pirj)
- #585: Make
Rails/ReadWriteAttribute
cop aware of shadowing methods. (@drenmi) - #604: Remove
remove_reference
andremove_belongs_to
methods fromRails/ReversibleMigration
cop offenses. (@TonyArra)
- #598: Add new
Rails/CompactBlank
cop. (@koic) - #586: Add new
Rails/RootJoinChain
cop. (@leoarnold) - #571: Add
Rails/DurationArithmetic
cop. (@pirj) - #594: Add
Rails/RedundantPresenceValidationOnBelongsTo
cop. (@pirj) - #568: Add
Rails/SchemaComment
cop. (@vitormd)
- #591: Add
change_column
check toRails/ReversibleMigration
. (@mattmccormick) - Add
remove_reference
check toRails/ReversibleMigration
. (@mattmccormick) - #576: Mark
Rails/TimeZone
as unsafe auto-correction from unsafe. (@koic) - #582: Unmark
AutoCorrect: false
fromRails/RelativeDateConstant
. (@koic) - #580: Unmark
AutoCorrect: false
fromRails/UniqBeforePluck
. (@koic)
- #556: Fix a false positive for
Rails/ContentTag
when using using thetag
method with 3 or more arguments. (@koic) - #551: Fix a false positive for
Rails/FindEach
when usingmodel.errors.where
in Rails 6.1. (@koic) - #543: Fix an error for
Rails/ContentTag
whentag
is not a top-level method. (@koic) - #559: Fix an error for
Rails/RelativeDateConstant
when using multiple assignment. (@koic) - #553: Fix a false positive for
Rails/ReversibleMigration
when usingt.remove
withtype
option in Rails 6.1. (@koic)
- #546: Exclude
app/models
by default forRails/ContentTag
. (@koic) - #570: Make
Rails/CreateTableWithTimestamps
respectactive_storage_variant_records
table ofdb/migrate/*_create_active_storage_tables.active_storage.rb
auto-generated bybin/rails active_storage:install
even ifcreated_at
is not specified. (@koic)
- #541: Fix an error for
Rails/HasManyOrHasOneDependent
when using lambda argument and specifying:dependent
strategy. (@koic)
- #535: Fix an error for
Rails/HasManyOrHasOneDependent
when using lambda argument and not specifying any options. (@koic)
- #521: Support auto-correction for
Rails/Output
. (@koic) - #520: Support auto-correction for
Rails/ScopeArgs
. (@koic) - #524: Add new
Rails/RedundantTravelBack
cop. (@koic)
- #528: Fix a false positive for
Rails/HasManyOrHasOneDependent
when specifying:dependent
strategy with double splat. (@koic) - #529: Fix a false positive for
Rails/LexicallyScopedActionFilter
when action method is aliased byalias_method
. (@koic) - #532: Fix a false positive for
Rails/HttpPositionalArguments
when definingget
inRails.application.routes.draw
block. (@koic)
- #260: Change target of
Rails/ContentTag
fromcontent_tag
method totag
method. (@tabuchi0919)
- #517: Fix an issue for
Rails/UniqueValidationWithoutIndex
when validating uniqueness with a polymorphic scope. (@theunraveler)
- #515: Fix an error for
Rails/BulkChangeTable
when using Psych 4.0. (@koic) - #512: Fix a false positive for
Rails/FindBy
when usingtake
with arguments. (@koic)
- #509: Fix an error for
Rails/ReflectionClassName
when usingclass_name: to_s
. (@skryukov) - #510: Fix an error for
Rails/FindBy
when calling#first
or#take
on aRange
object. (@johnsyweb) - #507: Fix an error for
Rails/FindBy
when callingtake
after block. (@koic) - #504: Fix a false positive for
Rails/FindBy
when receiver is not an Active Record. (@nvasilevski)
- #486: Add new
Rails/ExpandedDateRange
cop. (@koic) - #494: Add new
Rails/UnusedIgnoredColumns
cop. (@pocke) - #490: Make
Rails/HttpStatus
aware ofhead
method. (@koic) - #483: Add new
Rails/EagerEvaluationLogMessage
cop. (@aesthetikx) - #495: Add new
Rails/I18nLocaleAssignment
cop. (@koic) - #497: Add new
Rails/AddColumnIndex
cop. (@dvandersluis)
- #482: Fix a false positive for
Rails/RelativeDateConstant
when assigning (hashes/arrays/etc)-containing procs to a constant. (@jdelStrother) - #419: Fix an error for
Rails/UniqueValidationWithoutIndex
when using a unique index andcheck_constraint
that hasnil
first argument. (@koic) - #70: Fix a false positive for
Rails/TimeZone
when settingEnforcedStyle: strict
and usingTime.current
. (@koic) - #488: Fix a false positive for
Rails/ReversibleMigrationMethodDefinition
when using cbase migration class. (@koic) - #500: Fix a false positive for
Rails/DynamicFindBy
when using dynamic finder with hash argument. (@koic)
- #288: Add
AllowToTime
option (true
by default) toRails/Date
. (@koic) - #499: Add
IgnoreWhereFirst
option (true
by default) toRails/FindBy
. (@koic) - #505: Set disabled by default for
Rails/EnvironmentVariableAccess
. (@koic)
- #457: Add new
Rails/ReversibleMigrationMethodDefinition
cop. (@leonp1991) - #446: Add new
Rails/RequireDependency
cop. (@tubaxenor) - #458: Add new
Rails/TimeZoneAssignment
cop. (@olivierbuffon) - #442: Add new
Rails/EnvironmentVariableAccess
cop. (@drenmi)
- #421: Fix incorrect auto-correct for
Rails/LinkToBlank
when usingtarget: '_blank'
with hash brackets for the option. (@koic) - #436: Fix a false positive for
Rails/ContentTag
when the first argument is a splat argument. (@koic) - #435: Fix a false negative for
Rails/BelongsTo
when usingbelongs_to
lambda block withrequired
option. (@koic) - #451: Fix a false negative for
Rails/RelativeDateConstant
when a method is chained after a relative date method. (@koic) - #450: Fix a crash for
Rails/ContentTag
with nested content tags. (@tejasbubane) - #103: Fix a false positive for
Rails/FindEach
when not inheritingActiveRecord::Base
and usingall.each
. (@koic) - #466: Fix a false positive for
Rails/DynamicFindBy
when not inheritingApplicationRecord
and without no receiver. (@koic) - #147: Fix a false positive for
Rails/HasManyOrHasOneDependent
when specifying defaultdependent: nil
strategy. (@koic) - #137: Make
Rails/HasManyOrHasOneDependent
aware ofreadonly?
istrue
. (@koic) - #474: Fix a false negative for
Rails/SafeNavigation
when usingtry!
without receiver. (@koic) - #126: Fix an incorrect auto-correct for
Rails/SafeNavigation
withStyle/RedndantSelf
. (@koic) - #476: Fix a false positive for
Rails/ReversibleMigration
when usingdrop_table
with symbol proc. (@koic)
- #409: Deconstruct "table.column" in
Rails/WhereNot
. (@mobilutz) - #416: Make
Rails/HasManyOrHasOneDependent
accept combination of association extension andwith_options
. (@ohbarye) - #432: Exclude gemspec file by default for
Rails/TimeZone
cop. (@koic) - #440: This PR makes
Rails/TimeZone
aware of timezone specifier. (@koic) - #381: Update
IgnoredMethods
list forLint/NumberConversion
to allow Rails' duration methods. (@dvandersluis) - #444: Mark
Rails/Blank
as unsafe auto-correction. (@koic) - #451: Make
Rails/RelativeDateConstant
aware ofyesterday
andtomorrow
methods. (@koic) - #454: Mark
Rails/WhereExists
as unsafe auto-correction. (@koic) - #403: Mark
Rails/WhereEquals
as unsafe auto-correction. (@koic) - #379: Mark
Rails/DynamicFindBy
as unsafe. (@koic) - #106: Mark
Rails/ReflectionClassName
as unsafe. (@koic) - #106: Make
Rails/ReflectionClassName
aware of the use of string withto_s
. (@koic) - #456: (Compatibility) Drop Ruby 2.4 support. (@koic)
- #462: Require RuboCop 1.7 or higher. (@koic)
- #408: Fix bug in
Rails/FindEach
where config was ignored. (@ghiculescu) - #401: Fix an error for
Rails/WhereEquals
using only named placeholder template without replacement argument. (@koic)
- #404: Make
Rails/HelperInstanceVariable
accepts of instance variables when a class which inheritsActionView::Helpers::FormBuilder
. (@koic) - #406: Deconstruct "table.column" in
Rails/WhereEquals
. (@mobilutz)
- #362: Add new
Rails/WhereEquals
cop. (@eugeneius) - #339: Add new
Rails/AttributeDefaultBlockValue
cop. (@cilim) - #344: Add new
Rails/ArelStar
cop which checks for quoted literal asterisks inarel_table
calls. (@flanger001) - #389: Add
IgnoredMethods
config option forRails/FindEach
cop. (@tejasbubane)
- #371: Fix an infinite loop error for
Rails/ActiveRecordCallbacksOrder
when callbacks have inline comments. (@fatkodima) - #364: Fix a problem that
Rails/UniqueValidationWithoutIndex
doesn't work in classes defined with compact style. (@sinsoku) - #384: Mark unsafe for
Rails/NegateInclude
. (@koic) - #394: Fix false offense detection of
Rails/RedundantAllowNil
when using both allow_nil and allow_blank on different helpers of the same validator`. (@ngouy)
- #383: Require RuboCop 0.90 or higher. (@koic)
- #365: Mark
Rails/SquishedSQLHeredocs
unsafe for autocorrection. (@tejasbubane)
- #345: Fix error of
Rails/AfterCommitOverride
onafter_commit
with a lambda. (@pocke) - #349: Fix errors of
Rails/UniqueValidationWithoutIndex
. (@Tietew) - #338: Fix a false positive for
Rails/IndexBy
andRails/IndexWith
when theeach_with_object
hash is used in the transformed key or value. (@eugeneius) - #351: Add
<>
operator toRails/WhereNot
cop. (@Tietew) - #352: Do not register offense if given a splatted hash. (@dvandersluis)
- #346: Fix a false positive for
Rails/DynamicFindBy
when any of the arguments are splat argument. (@koic) - #357: Fix a false positive for
Rails/ReversibleMigration
when keyword arguments ofchange_column_default
are in the order ofto
,from
. (@koic)
- #291: Add new
Rails/SquishedSQLHeredocs
cop. (@mobilutz) - #52: Add new
Rails/AfterCommitOverride
cop. (@fatkodima) - #323: Add new
Rails/OrderById
cop. (@fatkodima) - #274: Add new
Rails/WhereNot
cop. (@fatkodima) - #311: Make
Rails/HelperInstanceVariable
aware of memoization. (@koic) - #332: Fix
Rails/ReflectionClassName
cop false negative when relation had a scope parameter. (@bubaflub)
- #315: Allow to use frozen scope for
Rails/UniqueValidationWithoutIndex
. (@krim) - #313: Fix
Rails/ActiveRecordCallbacksOrder
to preserve the original callback execution order. (@eugeneius) - #319: Fix a false positive for
Rails/Inquiry
when#inquiry
's receiver is a variable. (@koic) - #327: Fix
Rails/ContentTag
autocorrect to handle html5 tag names with hyphens. (@jaredmoody)
- #312: Mark
Rails/MailerName
as unsafe for auto-correct. (@eugeneius) - #294: Update
Rails/ReversibleMigration
to register offenses forremove_columns
andremove_index
. (@philcoggins) - #310: Add
EnforcedStyle
toRails/PluckInWhere
. By default, it does not register an offense ifpluck
method's receiver is a variable. (@koic) - #320: Mark
Rails/UniqBeforePluck
as unsafe auto-correction. (@kunitoo) - #324: Make
Rails/IndexBy
andRails/IndexWith
aware ofto_h
with block. (@eugeneius) - #341: Make
Rails/WhereExists
configurable to allowwhere(...).exists?
to be the preferred style. (@dvandersluis)
- #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)
- #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)
- #261: Fix auto correction for
Rails/ContentTag
whencontent_tag
is called with options hash and block. (@fatkodima)
- #263: Change terminology to
ForbiddenMethods
andAllowedMethods
. (@jcoyne) - #289: Update
Rails/SkipsModelValidations
to register an offense forinsert_all
,touch_all
,upsert_all
, etc. (@eugeneius) - #293: Require RuboCop 0.87 or higher. (@koic)
- #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: (Compatibility) Drop support for Ruby 2.3. (@koic)
- #236: (Compatibility) 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)