diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-05-12 16:19:38 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-06-25 15:17:30 +0100 |
commit | 8d052d925a69a857f52bc41512eb853a767714f5 (patch) | |
tree | 0cdf2495b5270aeb8dace3216464c5ee56441e35 /app/controllers/application_controller.rb | |
parent | 89700f017d193fc4c50f712132ad05a5294d3181 (diff) |
Add deprecation notice for ruby 1.8.7add-deprecation-notice
Not in an initializer to avoid any risk of popping up in mail
handling contexts.
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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' |