From 6690d662920f0db854f7303cd2a5a36c72299199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 5 Apr 2010 10:52:47 +0200 Subject: Rename config.cookie_secret to config.secret_token and pass it as configuration in request.env. This is another step forward removing global configuration. --- railties/lib/rails/configuration.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'railties/lib/rails/configuration.rb') diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 73ae9bcb16..dfd849b4bb 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -104,6 +104,18 @@ module Rails "please do paths.app.controllers instead", caller paths.app.controllers.to_a.uniq end + + def cookie_secret=(value) + ActiveSupport::Deprecation.warn "config.cookie_secret= is deprecated, " << + "please use config.secret_token= instead", caller + self.secret_token = value + end + + def cookie_secret + ActiveSupport::Deprecation.warn "config.cookie_secret is deprecated, " << + "please use config.secret_token instead", caller + self.secret_token + end end end end -- cgit v1.2.3