Skip to content
This repository has been archived by the owner on Aug 17, 2017. It is now read-only.

Commit

Permalink
Merge pull request #100 from bryanrite/patch-1
Browse files Browse the repository at this point in the history
Update README.rdoc
  • Loading branch information
fxn committed Feb 16, 2013
2 parents 368141d + 1db7d98 commit 1fddb10
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.rdoc
Expand Up @@ -72,6 +72,10 @@ every model you want protected.
include ActiveModel::ForbiddenAttributesProtection
end

Alternatively, you can protect all Active Record resources by default by creating an initializer and pasting the line:

ActiveRecord::Base.send(:include, ActiveModel::ForbiddenAttributesProtection)

If you want to now disable the default whitelisting that occurs in later versions of Rails, change the +config.active_record.whitelist_attributes+ property in your +config/application.rb+:

config.active_record.whitelist_attributes = false
Expand Down

0 comments on commit 1fddb10

Please sign in to comment.