Exception: ActiveModel::ForbiddenAttributesError
- Inherits:
-
StandardError
- Object
- StandardError
- ActiveModel::ForbiddenAttributesError
- Defined in:
- lib/active_model/forbidden_attributes_protection.rb
Overview
Raised when forbidden attributes are used for mass assignment.
class Person < ActiveRecord::Base
end
params = ActionController::Parameters.new(name: 'Bob')
Person.new(params)
# => ActiveModel::ForbiddenAttributesError
params.permit!
Person.new(params)
# => #<Person id: nil, name: "Bob">