Skip to content

Rails/CreateTableWithTimestamps should consider it #1413

@shyouhei

Description

@shyouhei

Expected behavior

No offences reported

Actual behavior

Rails/CreateTableWithTimestamps: Add timestamps when creating a new table. reported

Steps to reproduce the problem

class CreateAccounts < ActiveRecord::Migration[8.0]
  def change = create_table(:test) { it.timestamps }
end

Note: the same happens for _1

RuboCop version

$ bundle exec rubocop -V
1.70.0 (using Parser 3.3.6.0, rubocop-ast 1.37.0, analyzing as Ruby 3.4, running on ruby 3.4.1) [aarch64-linux-gnu]

rubocop-rails 2.28.0 is affected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions