Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1996 from bogdan/default_sanitizer_squashed

Rails app template: setup different mass assignment sanitizer for envs
  • Loading branch information...
commit 4b6232e5a73341b1c98218a47e81e7017f8e78d2 2 parents 03a016c + 0fab8c3
@josevalim josevalim authored
View
3  railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
@@ -22,6 +22,9 @@
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
+ # Raise exception on mass assignment protection for ActiveRecord models
+ config.active_record.mass_assignment_sanitizer = :strict
+
# Do not compress assets
config.assets.compress = false
end
View
3  railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
@@ -34,6 +34,9 @@
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
+ # Raise exception on mass assignment protection for ActiveRecord models
+ config.active_record.mass_assignment_sanitizer = :strict
+
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
end
Please sign in to comment.
Something went wrong with that request. Please try again.