Skip to content

Releases: rubocop/rubocop-rails

RuboCop Rails 2.14.0

15 Mar 03:11
Compare
Choose a tag to compare

New features

Bug fixes

  • #636: Fix a false positive for Rails/ContentTag when using tag method in config/puma.rb. (@koic)
  • #635: Handle t.remove with multiple columns in Rails/BulkChangeTable. (@eugeneius)

Changes

  • #646: Exclude db/schema.rb and db/[CONFIGURATION_NAMESPACE]_schema.rb by default. (@koic)
  • #650: Make Rails/CompactBlank aware of delete_if(&:blank). (@koic)
  • #631: Update Rails/Pluck to be aware of numblocks. (@sammiya)

RuboCop Rails 2.13.2

15 Jan 03:15
Compare
Choose a tag to compare

New features

Bug fixes

  • #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 of blank? is not a block variable. (@koic)
  • #622: Add month(s) and year(s) to Rails/DurationArithmetic cop. (@agrobbin)
  • #623: Fix method shadowing check for Rails/ReadWriteAttribute cop. (@nvasilevski)

Changes

  • #615: Change Rails/RedundantPresenceValidationOnBelongsTo to SafeAutoCorrect: false. (@TonyArra)
  • #463: Support multiple databases for ReversibleMigration and ReversibleMigrationMethodDefinition cops. (@fatkodima)

RuboCop Rails 2.13.1

09 Jan 21:04
Compare
Choose a tag to compare

Bug fixes

  • #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)

Changes

  • #585: Make Rails/ReadWriteAttribute cop aware of shadowing methods. (@drenmi)
  • #604: Remove remove_reference and remove_belongs_to methods from Rails/ReversibleMigration cop offenses. (@TonyArra)

RuboCop Rails 2.13.0

25 Dec 08:47
Compare
Choose a tag to compare

New features

Changes

  • #591: Add change_column check to Rails/ReversibleMigration. (@mattmccormick)
  • Add remove_reference check to Rails/ReversibleMigration. (@mattmccormick)
  • #576: Mark Rails/TimeZone as unsafe auto-correction from unsafe. (@koic)
  • #582: Unmark AutoCorrect: false from Rails/RelativeDateConstant. (@koic)
  • #580: Unmark AutoCorrect: false from Rails/UniqBeforePluck. (@koic)

RuboCop Rails 2.12.4

15 Oct 22:58
Compare
Choose a tag to compare

Bug fixes

  • #573: Fix an error for Rails/FindEach when using where with no receiver. (@koic)

RuboCop Rails 2.12.3

06 Oct 10:13
Compare
Choose a tag to compare

Bug fixes

  • #556: Fix a false positive for Rails/ContentTag when using using the tag method with 3 or more arguments. (@koic)
  • #551: Fix a false positive for Rails/FindEach when using model.errors.where in Rails 6.1. (@koic)
  • #543: Fix an error for Rails/ContentTag when tag 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 using t.remove with type option in Rails 6.1. (@koic)

Changes

  • #546: Exclude app/models by default for Rails/ContentTag. (@koic)
  • #570: Make Rails/CreateTableWithTimestamps respect active_storage_variant_records table of db/migrate/*_create_active_storage_tables.active_storage.rb auto-generated by bin/rails active_storage:install even if created_at is not specified. (@koic)

RuboCop Rails 2.12.2

11 Sep 01:29
Compare
Choose a tag to compare

Bug fixes

  • #541: Fix an error for Rails/HasManyOrHasOneDependent when using lambda argument and specifying :dependent strategy. (@koic)

RuboCop Rails 2.12.1

10 Sep 00:20
Compare
Choose a tag to compare

Bug fixes

  • #535: Fix an error for Rails/HasManyOrHasOneDependent when using lambda argument and not specifying any options. (@koic)

RuboCop Rails 2.12.0

09 Sep 03:07
Compare
Choose a tag to compare

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 by alias_method. (@koic)
  • #532: Fix a false positive for Rails/HttpPositionalArguments when defining get in Rails.application.routes.draw block. (@koic)

Changes

  • #260: Change target of Rails/ContentTag from content_tag method to tag method. (@tabuchi0919)

RuboCop Rails 2.11.3

11 Jul 08:22
Compare
Choose a tag to compare

Bug fixes

  • #517: Fix an issue for Rails/UniqueValidationWithoutIndex when validating uniqueness with a polymorphic scope. (@theunraveler)