diff options
author | Bogdan Gusiev <agresso@gmail.com> | 2011-07-28 11:56:08 +0300 |
---|---|---|
committer | Bogdan Gusiev <agresso@gmail.com> | 2011-07-28 11:56:08 +0300 |
commit | b93a918337e99c3fe3ad059f093b1ee56b9e6a7d (patch) | |
tree | 9984f7c01953780f3e506bf1008665b3028ca00f /railties/lib | |
parent | 451f63b42e411a57796baccca7d27b5746bff49b (diff) | |
download | rails-b93a918337e99c3fe3ad059f093b1ee56b9e6a7d.tar.gz rails-b93a918337e99c3fe3ad059f093b1ee56b9e6a7d.tar.bz2 rails-b93a918337e99c3fe3ad059f093b1ee56b9e6a7d.zip |
MassAssignmentProtection: consider 'id' insensetive in StrictSanitizer
In order to use StrictSanitizer in test mode
Consider :id as not sensetive attribute that can be filtered from
mass assignement without exception.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt index ee068b0202..80198cc21e 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt @@ -34,6 +34,11 @@ # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql + <%- unless options.skip_active_record? -%> + # Raise exception on mass assignment protection for ActiveRecord models + config.active_record.mass_assignment_sanitizer = :strict + <%- end -%> + # Print deprecation notices to the stderr config.active_support.deprecation = :stderr end |