This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge pull request #100 from bryanrite/patch-1

Update README.rdoc
  • Loading branch information...
fxn committed Feb 16, 2013
2 parents 368141d + 1db7d98 commit 1fddb10fcff71a3c7436aea68105f9bc054b0938
Showing with 4 additions and 0 deletions.
  1. +4 −0 README.rdoc
View
@@ -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

0 comments on commit 1fddb10

Please sign in to comment.