module ActiveRecord::MassAssignmentSecurity::Inheritance::ClassMethods
Private Instance Methods
subclass_from_attributes?(attrs)
click to toggle source
Detect the subclass from the inheritance column of attrs. If the inheritance column value is not self or a valid subclass, raises ActiveRecord::SubclassNotFound If this is a StrongParameters hash, and access to inheritance_column is not permitted, this will ignore the inheritance column and return nil
Calls superclass method
# File lib/active_record/mass_assignment_security/inheritance.rb, line 12 def subclass_from_attributes?(attrs) active_authorizer[:default].deny?(inheritance_column) ? nil : super end
subclass_from_attrs(attrs)
click to toggle source
Support Active Record <= 4.0.3, which uses the old method signature.
Calls superclass method
# File lib/active_record/mass_assignment_security/inheritance.rb, line 17 def subclass_from_attrs(attrs) active_authorizer[:default].deny?(inheritance_column) ? nil : super end