Skip to content

Commit

Permalink
Merge pull request #570 from koic/make_create_table_with_timestamps_a…
Browse files Browse the repository at this point in the history
…ware_of_ast_variant_records

Make `Rails/CreateTableWithTimestamps` respect `active_storage_variant_records` table
  • Loading branch information
koic committed Oct 3, 2021
2 parents 7579e81 + b861061 commit a4f081a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#570](https://github.com/rubocop/rubocop-rails/pull/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][])
4 changes: 4 additions & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ Rails/CreateTableWithTimestamps:
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: >-
Expand Down
4 changes: 4 additions & 0 deletions docs/modules/ROOT/pages/cops_rails.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,10 @@ end
| Include
| `db/migrate/*.rb`
| Array

| Exclude
| `db/migrate/*_create_active_storage_tables.active_storage.rb`
| Array
|===

== Rails/Date
Expand Down

0 comments on commit a4f081a

Please sign in to comment.