Module: DynamicActiveModel::DangerousAttributesPatch
- Defined in:
- lib/dynamic-active-model/dangerous_attributes_patch.rb
Overview
DynamicActiveModel::DangerousAttributesPatch is used to remove dangerous attribute names from attribute_names method in ActiveRecord
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
7 8 9 10 |
# File 'lib/dynamic-active-model/dangerous_attributes_patch.rb', line 7 def self.included(base) base.singleton_class.send(:alias_method, :original_attribute_names, :attribute_names) base.extend ClassMethods end |