Class: RuboCop::Cop::Netlify::InvalidModelAssignment
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::Netlify::InvalidModelAssignment
- Defined in:
- lib/rubocop/cop/netlify/invalid_model_assignment.rb
Overview
This cop checks attribute assignment of Mongoid models
Constant Summary collapse
- MSG =
"Assigning to `attributes` will not update record"
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
21 22 23 |
# File 'lib/rubocop/cop/netlify/invalid_model_assignment.rb', line 21 def on_send(node) add_offense(node) if assign_attributes? node end |