-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
Description
When using to_proc syntax, the Rails/CreateTableWithTimestamps rule gives a false positive:
db/migrate/20130718144328_create_guest_accounts.rb:4:5: C: Rails/CreateTableWithTimestamps: Add timestamps when creating a new table.
create_table(:guest_accounts, &:timestamps)
Expected behavior
There should be no violation reported
Actual behavior
There is a violation reported
Steps to reproduce the problem
Run against a migration that looks like:
class CreateGuestAccounts < ActiveRecord::Migration
def change
create_table(:guest_accounts, &:timestamps)
end
endRuboCop version
Include the output of rubocop -V. Here's an example:
$ rubocop -V
0.52.1 (using Parser 2.4.0.2, running on ruby 2.3.3 x86_64-linux)
malikolivier