From efd65a8498922e3d777781cdf4f5b7abb14e8e33 Mon Sep 17 00:00:00 2001 From: Alex Burkhart Date: Thu, 12 Apr 2012 10:51:51 -0400 Subject: [PATCH] Rails 3.2 config options. --- config/environments/development.rb | 9 +++++++++ config/environments/test.rb | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 27c0969..001274b 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -24,5 +24,14 @@ config.assets.compress = false config.assets.debug = true + + # Raise exception on mass assignment protection for Active Record models + config.active_record.mass_assignment_sanitizer = :strict + + # Log the query plan for queries taking more than this (works + # with SQLite, MySQL, and PostgreSQL) + config.active_record.auto_explain_threshold_in_seconds = 0.5 + + config.log_tags = [:uuid, :remote_ip] end diff --git a/config/environments/test.rb b/config/environments/test.rb index e474d6a..33a7668 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -35,5 +35,7 @@ config.serve_static_assets = true config.static_cache_control = "public, max-age=3600" - + + # Raise exception on mass assignment protection for Active Record models + config.active_record.mass_assignment_sanitizer = :strict end