# ri > ActiveModel::ForbiddenAttributesError

## [ActiveModel::ForbiddenAttributesError](https://www.chedong.com/phpMan.php/perldoc/ActiveModel%3A%3AForbiddenAttributesError/markdown) < StandardError

(from /home/chedong/.local/share/rdoc)
------------------------------------------------------------------------
Raised when forbidden attributes are used for mass assignment.

  class Person < [ActiveRecord::Base](https://www.chedong.com/phpMan.php/perldoc/ActiveRecord%3A%3ABase/markdown)
  end

  params = [ActionController::Parameters](https://www.chedong.com/phpMan.php/perldoc/ActionController%3A%3AParameters/markdown).new(name: 'Bob')
  Person.new(params)
  # => [ActiveModel::ForbiddenAttributesError](https://www.chedong.com/phpMan.php/perldoc/ActiveModel%3A%3AForbiddenAttributesError/markdown)

  params.permit!
  Person.new(params)
  # => #<Person id: nil, name: "Bob">
------------------------------------------------------------------------
