diff options
author | Bogdan Gusiev <agresso@gmail.com> | 2011-07-28 11:56:08 +0300 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-08-13 16:22:26 -0700 |
commit | f86f7702507f477eb8f0a8e914bdb53219fac953 (patch) | |
tree | 47fb43aa64e25c8deb6768a5eb146c45f2db145f /railties | |
parent | 5f3265c4714efd697cb71015489a9c59d1129440 (diff) | |
download | rails-f86f7702507f477eb8f0a8e914bdb53219fac953.tar.gz rails-f86f7702507f477eb8f0a8e914bdb53219fac953.tar.bz2 rails-f86f7702507f477eb8f0a8e914bdb53219fac953.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')
-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 |