From cac3f817efb4940c5fab173e72b539be88647948 Mon Sep 17 00:00:00 2001 From: Aditya Prakash Date: Fri, 12 Feb 2016 15:35:33 +0530 Subject: [PATCH] Remove deprecation warnings due to update of rails * `config.serve_static_assets` has been renamed to `config.serve_static_files` and former will be removed in rails 5 * propagate errors raised within `after_rollback`/`after_commit` callbacks. Read more at: http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#error-handling-in-transaction-callbacks --- config/application.rb | 4 ++++ config/environments/production.rb | 2 +- config/environments/test.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/application.rb b/config/application.rb index 91ac6591..6f863991 100644 --- a/config/application.rb +++ b/config/application.rb @@ -60,5 +60,9 @@ module Osem # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' + + # Errors raised within `after_rollback`/`after_commit` propagate normally + # like in other Active Record callbacks. + config.active_record.raise_in_transactional_callbacks = true end end diff --git a/config/environments/production.rb b/config/environments/production.rb index 69c7f9de..97bb10d6 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -15,7 +15,7 @@ Osem::Application.configure do config.eager_load = true # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false + config.serve_static_files = false # Compress JavaScripts and CSS config.assets.compress = true diff --git a/config/environments/test.rb b/config/environments/test.rb index d33fbc31..42d753ee 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -8,7 +8,7 @@ Osem::Application.configure do config.cache_classes = true # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true + config.serve_static_files = true config.static_cache_control = 'public, max-age=3600' # Do not eager load code on boot.