class ActiveModel::UnknownAttributeError

# => ActiveModel::UnknownAttributeError: unknown attribute ‘name’ for Person.
person.assign_attributes(name: ‘Gorby’)
person = Person.new
end
include ActiveModel::Validations
include ActiveModel::AttributeAssignment
class Person
Raised when unknown attributes are supplied via mass assignment.

def initialize(record, attribute)

def initialize(record, attribute)
  @record = record
  @attribute = attribute
  super("unknown attribute '#{attribute}' for #{@record.class}.")
end