class UnknownAttributeError
Ruby on Rails 7.0.10
Since v5.2.8.1Raised when unknown attributes are supplied via mass assignment.
class Person
include ActiveModel::AttributeAssignment
include ActiveModel::Validations
end
person = Person.new
person.assign_attributes(name: 'Gorby')
# => ActiveModel::UnknownAttributeError: unknown attribute 'name' for Person.
Inherits from
Attributes
Methods (defined here)
- self. new