Created
August 17, 2010 09:52
-
-
Save jasoncodes/529125 to your computer and use it in GitHub Desktop.
Noisy protected attributes (mass-assignment security)
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
ActiveRecord::Base.send(:attr_accessible, nil) |
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
module ActiveModel::MassAssignmentSecurity::Sanitizer | |
protected | |
def warn!(attrs) | |
raise "Can't mass-assign protected attributes: #{attrs.join(', ')}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment