Skip to content

RuboCop Rails 2.18 (a.k.a. Ruby 30th Anniversary Edition)

Compare
Choose a tag to compare
@koic koic released this 25 Feb 08:56
· 527 commits to master since this release

New features

Bug fixes

  • #824: Fix a false negative for Rails/ActionControllerTestCase when the class is namespaced. (@vlad-pisanov)
  • #909: Fix a false positive for Rails/ActionControllerFlashBeforeRender when using flash before redirect_to in if branch. (@koic)
  • #898: Fix a false positive for Rails/ActiveRecordAliases when arguments of update_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)

Changes

  • #263: Accept actions defined via alias in Rails/LexicallyScopedActionFilter. (@fatkodima)
  • #902: Ignore redirect method for Style/FormatStringToken by default. (@javierjulio)
  • #935: Make Style/InverseMethods aware of Active Support's present?, blank?, include?, and exclude? methods. (@koic)
  • #914: Make Style/InverseMethods aware of valid? and invalid? methods. (@koic)
  • #826: Mark Rails/Pluck as unsafe. (@fatkodima)
  • #896: Raise severity of Rails/ActiveRecordOverride, Rails/DeprecatedActiveModelErrorsMethods, Rails/DuplicateAssociation, Rails/DuplicateScope, Rails/TopLevelHashWithIndifferentAccess, and Rails/WhereNotWithMultipleConditions cops to warning. (@koic)