Class: RuboCop::Cop::Airbnb::MassAssignmentAccessibleModifier

Inherits:
Base
  • Object
show all
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
RESTRICT_ON_SEND =
%i(accessible=).freeze

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



10
11
12
# File 'lib/rubocop/cop/airbnb/mass_assignment_accessible_modifier.rb', line 10

def on_send(node)
  add_offense(node, message: MSG)
end