Releases: rubocop/rubocop-rails
Releases · rubocop/rubocop-rails
RuboCop Rails 2.25.0
New features
- #1272: Add new
Rails/WhereRange
cop. (@fatkodima)
Bug fixes
- #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)
Changes
- #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)
RuboCop Rails 2.24.1
Bug fixes
- #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)
Changes
- #1257: Add Rails 7.1 load hooks and
active_record_sqlite3adapter
toRails/ActiveSupportOnLoad
. (@earlopain)
RuboCop Rails 2.24.0
New features
Bug fixes
- #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)
Changes
- #1229: Make
Rails/EnvironmentVariableAccess
aware of initializers. (@markokajzer) - #1231: Remove
object_id
fromRails/DangerousColumnNames
targets. (@r7kamura)
RuboCop Rails 2.23.1
Bug fixes
- #1221: Fix an exception in
Rails/WhereNot
when calling.where
on an implicit receiver (e.g. inside model code). (@bquorning)
RuboCop Rails 2.23.0 (The RubyConf Taiwan 2023 Edition)
New features
- #1183: Support PostGIS adapter for PostgreSQL. (@Dania02525)
Bug fixes
- #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)
Changes
- #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)
RuboCop Rails 2.22.2
Bug fixes
- #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)
Changes
- #1171: Change
Rails/RedundantActiveRecordAllMethod
to ignoredelete_all
anddestroy_all
when receiver is an association. (@masato-bkn) - #1178: Require RuboCop AST 1.30.0+. (@koic)
RuboCop Rails 2.22.1
RuboCop Rails 2.22.0
New features
- #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)
Bug fixes
- #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)
Changes
RuboCop Rails 2.21.2
Bug fixes
- #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)
RuboCop Rails 2.21.1
Bug fixes
- #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)