From 8d052d925a69a857f52bc41512eb853a767714f5 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Tue, 12 May 2015 16:19:38 +0100 Subject: Add deprecation notice for ruby 1.8.7 Not in an initializer to avoid any risk of popping up in mail handling contexts. --- app/controllers/application_controller.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a76e6630a..9172cd920 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -35,6 +35,15 @@ class ApplicationController < ActionController::Base before_filter :set_vary_header before_filter :validate_session_timestamp after_filter :persist_session_timestamp + before_filter :deprecation_notice + + def deprecation_notice + if RUBY_VERSION.to_f >= 1.9 + ActiveSupport::Deprecation.warn "[DEPRECATION] You are using Ruby 1.8. This will not be supported " \ + "as of Alaveteli release 0.23. Please upgrade your ruby version." + end + end + def set_vary_header response.headers['Vary'] = 'Cookie' -- cgit v1.2.3