Use standard rubocop conventions

* remove trailing whitespace
* %i delimiters use square brackets

When I ran rubocop in my project, the following warnings popped up
```
db/migrate/20220227060245_create_versions.rb:31:8: C: [Correctable] Layout/TrailingWhitespace: Trailing whitespace detected.
      # 
       ^
db/migrate/20220227060245_create_versions.rb:33:41: C: [Correctable] Layout/TrailingWhitespace: Trailing whitespace detected.
      # t.datetime :created_at, limit: 6                                        
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
db/migrate/20220227060245_create_versions.rb:36:26: C: [Correctable] Style/PercentLiteralDelimiters: %i-literals should be delimited by [ and ].
    add_index :versions, %i(item_type item_id)
                         ^^^^^^^^^^^^^^^^^^^^^
```
This commit is contained in:
Aaron 'Rails/Flutter' Kelton 2022-04-03 11:53:49 -05:00 committed by GitHub
parent 31d8207fc9
commit ab24a1229f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -28,11 +28,11 @@ class CreateVersions < ActiveRecord::Migration<%= migration_version %>
# MySQL users should also upgrade to at least rails 4.2, which is the first
# version of ActiveRecord with support for fractional seconds in MySQL.
# (https://github.com/rails/rails/pull/14359)
#
#
# MySQL users should use the following line for `created_at`
# t.datetime :created_at, limit: 6
# t.datetime :created_at, limit: 6
t.datetime :created_at
end
add_index :versions, %i(item_type item_id)
add_index :versions, %i[item_type item_id]
end
end