diff options
Diffstat (limited to 'config/environments')
-rw-r--r-- | config/environments/development.rb | 7 | ||||
-rw-r--r-- | config/environments/test.rb | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb index ecfad3af7..dbf8d7b2a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -39,4 +39,11 @@ Alaveteli::Application.configure do # Expands the lines which load the assets 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 + end diff --git a/config/environments/test.rb b/config/environments/test.rb index df39e8873..97c2d4f7c 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -24,4 +24,9 @@ Alaveteli::Application.configure do # Print deprecation notices to the stderr config.active_support.deprecation = :stderr + if !AlaveteliConfiguration.exception_notifications_from.blank? && !AlaveteliConfiguration.exception_notifications_to.blank? + middleware.use ExceptionNotifier, + :sender_address => AlaveteliConfiguration::exception_notifications_from, + :exception_recipients => AlaveteliConfiguration::exception_notifications_to + end end |