config/default.yml in rubocop-rails-2.12.2 vs config/default.yml in rubocop-rails-2.12.3
- old
+ new
@@ -7,11 +7,11 @@
AllCops:
Exclude:
- bin/*
- db/schema.rb
# What version of Rails is the inspected code using? If a value is specified
- # for TargetRailsVersion then it is used. Acceptable values are specificed
+ # for TargetRailsVersion then it is used. Acceptable values are specified
# as a float (i.e. 5.1); the patch version of Rails should not be included.
# If TargetRailsVersion is not set, RuboCop will parse the Gemfile.lock or
# gems.locked file to find the version of Rails that has been bound to the
# application. If neither of those files exist, RuboCop will use Rails 5.0
# as the default.
@@ -187,19 +187,26 @@
- 'https://github.com/rails/rails/issues/25195'
- 'https://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-content_tag'
Enabled: true
VersionAdded: '2.6'
VersionChanged: '2.12'
+ # This `Exclude` config prevents false positives for `tag` calls to `has_one: tag`. No helpers are used in normal models.
+ Exclude:
+ - app/models/**/*.rb
Rails/CreateTableWithTimestamps:
Description: >-
Checks the migration for which timestamps are not included
when creating a new table.
Enabled: true
VersionAdded: '0.52'
Include:
- db/migrate/*.rb
+ Exclude:
+ # Respect the `active_storage_variant_records` table of `*_create_active_storage_tables.active_storage.rb`
+ # auto-generated by `bin/rails active_storage:install` even if `created_at` is not specified.
+ - db/migrate/*_create_active_storage_tables.active_storage.rb
Rails/Date:
Description: >-
Checks the correct usage of date aware methods,
such as Date.today, Date.current etc.
@@ -814,10 +821,10 @@
- aggressive
SafeAutoCorrect: false
AutoCorrect: false
Rails/UniqueValidationWithoutIndex:
- Description: 'Uniqueness validation should be with a unique index.'
+ Description: 'Uniqueness validation should have a unique index on the database column.'
Enabled: true
VersionAdded: '2.5'
Include:
- app/models/**/*.rb