Releases: rubocop/rubocop-rails
Releases · rubocop/rubocop-rails
RuboCop Rails 2.12.2
RuboCop Rails 2.12.1
RuboCop Rails 2.12.0
New features
- #521: Support auto-correction for
Rails/Output
. (@koic) - #520: Support auto-correction for
Rails/ScopeArgs
. (@koic) - #524: Add new
Rails/RedundantTravelBack
cop. (@koic)
Bug fixes
- #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)
Changes
- #260: Change target of
Rails/ContentTag
fromcontent_tag
method totag
method. (@tabuchi0919)
RuboCop Rails 2.11.3
Bug fixes
- #517: Fix an issue for
Rails/UniqueValidationWithoutIndex
when validating uniqueness with a polymorphic scope. (@theunraveler)
RuboCop Rails 2.11.2
RuboCop Rails 2.11.1
Bug fixes
- #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)
RuboCop Rails 2.11.0
New features
- #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)
Bug fixes
- #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)
Changes
RuboCop Rails 2.10.1
RuboCop Rails 2.10.0
New features
- #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)
Bug fixes
- #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)
Changes
- #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: Drop Ruby 2.4 support. (@koic)
- #462: Require RuboCop 1.7 or higher. (@koic)
RuboCop Rails 2.9.1
Bug fixes
- #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)