Skip to content

Commit

Permalink
update AMo::ForbiddenAttributesError documentation [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Rodriguez committed Sep 20, 2012
1 parent 00da7c6 commit 1e56f1f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions activemodel/lib/active_model/forbidden_attributes_protection.rb
@@ -1,4 +1,16 @@
module ActiveModel module ActiveModel
# 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">
class ForbiddenAttributesError < StandardError class ForbiddenAttributesError < StandardError
end end


Expand Down

0 comments on commit 1e56f1f

Please sign in to comment.