Class: RuboCop::Cop::Rails::NotNullColumn
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Rails::NotNullColumn
- Defined in:
- lib/rubocop/cop/rails/not_null_column.rb
Overview
Checks for add_column call with NOT NULL constraint in migration file.
Constant Summary collapse
- MSG =
'Do not add a NOT NULL column without a default value.'- RESTRICT_ON_SEND =
%i[add_column add_reference].freeze
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
39 40 41 42 |
# File 'lib/rubocop/cop/rails/not_null_column.rb', line 39 def on_send(node) check_add_column(node) check_add_reference(node) end |