Skip to content

Commit

Permalink
Rails app template: setup different mass assignment sanitizer for envs
Browse files Browse the repository at this point in the history
For production - leave the default
For test and dev: :strict.
  • Loading branch information
bogdan committed Jul 7, 2011
1 parent f2c0fb3 commit 0fab8c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -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
Expand Up @@ -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

0 comments on commit 0fab8c3

Please sign in to comment.