Class: RuboCop::Cop::Airbnb::MassAssignmentAccessibleModifier
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Airbnb::MassAssignmentAccessibleModifier
- Defined in:
- lib/rubocop/cop/airbnb/mass_assignment_accessible_modifier.rb
Overview
Modifying Mass assignment restrictions eliminates the entire point of disabling mass assignment. It’s a lazy, potentially dangerous approach that should be discouraged.
Constant Summary collapse
- MSG =
'Do no override and objects mass assignment restrictions.'.freeze
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/rubocop/cop/airbnb/mass_assignment_accessible_modifier.rb', line 9 def on_send(node) _receiver, method_name, *_args = *node return unless method_name == :accessible= add_offense(node, message: MSG) end |