Created
March 14, 2012 02:23
-
-
Save gcirne/2033503 to your computer and use it in GitHub Desktop.
Disable Mass Assignment for Mongoid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/disable_mass_assignment.rb | |
module Mongoid::Document | |
self.included do |base| | |
base.send(:attr_accessible, nil) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment