Class: RuboCop::Cop::Gusto::ExecuteMigration

Inherits:
Base
  • Object
show all
Defined in:
lib/rubocop/cop/gusto/execute_migration.rb

Constant Summary collapse

MSG =
"Do not use `execute` to run raw SQL in a migration. Run the query from a backfill rake task or pass the SQL options to the `add_column`/`change_column` method."
RESTRICT_ON_SEND =
[:execute].freeze

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



10
11
12
# File 'lib/rubocop/cop/gusto/execute_migration.rb', line 10

def on_send(node)
  add_offense(node)
end