diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-04-27 13:11:17 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-04-27 13:11:17 -0500 |
commit | 21aa32692caf91f56d1c5c411baae635fa398344 (patch) | |
tree | 1b9c59452e40f6908599196598b7c07a6d07dee0 /actionpack/lib/action_dispatch/http | |
parent | dde063507ac40fda1a67f06a54c1a57d237f57b2 (diff) | |
download | rails-21aa32692caf91f56d1c5c411baae635fa398344.tar.gz rails-21aa32692caf91f56d1c5c411baae635fa398344.tar.bz2 rails-21aa32692caf91f56d1c5c411baae635fa398344.zip |
Delegate controller.session to request.session and deprecate response session
Diffstat (limited to 'actionpack/lib/action_dispatch/http')
-rwxr-xr-x | actionpack/lib/action_dispatch/http/request.rb | 8 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/http/response.rb | 6 |
2 files changed, 5 insertions, 9 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 0b8909ced7..2602b344ca 100755 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -451,14 +451,6 @@ EOM @env['rack.input'] end - def session - @env['rack.session'] - end - - def session_options - @env['rack.session.options'] - end - def reset_session self.session_options.delete(:id) self.session = {} diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index 6c92fb9713..ebba4eefa0 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -40,7 +40,11 @@ module ActionDispatch # :nodoc: attr_writer :header alias_method :headers=, :header= - delegate :session, :to => :request + def session + ActiveSupport::Deprecation.warn("response.session has been deprecated. Use request.session instead", caller) + request.session + end + delegate :default_charset, :to => 'ActionController::Base' def initialize |