diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-04-26 14:33:57 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-04-26 14:33:57 -0500 |
commit | 04949096797a390105c7ab9fb9b99938d5921dd4 (patch) | |
tree | 16316242f307d2f7a41189720ff10ebf44770b50 /actionpack/lib/action_dispatch/http | |
parent | c8919f4c7ca13ad78987ea0c8497abe85249975b (diff) | |
download | rails-04949096797a390105c7ab9fb9b99938d5921dd4.tar.gz rails-04949096797a390105c7ab9fb9b99938d5921dd4.tar.bz2 rails-04949096797a390105c7ab9fb9b99938d5921dd4.zip |
Inherit TestSession from Session::AbstractStore and add indifferent access to Session::AbstractStore.
Diffstat (limited to 'actionpack/lib/action_dispatch/http')
-rwxr-xr-x | actionpack/lib/action_dispatch/http/request.rb | 14 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/http/response.rb | 3 |
2 files changed, 5 insertions, 12 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index ab654b9a50..2602b344ca 100755 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -451,23 +451,15 @@ EOM @env['rack.input'] end - def session - @env['rack.session'] ||= {} + def reset_session + self.session_options.delete(:id) + self.session = {} end def session=(session) #:nodoc: @env['rack.session'] = session end - def reset_session - @env['rack.session.options'].delete(:id) - @env['rack.session'] = {} - end - - def session_options - @env['rack.session.options'] ||= {} - end - def session_options=(options) @env['rack.session.options'] = options end diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index 7bc9c62e2c..77c2dd0d7a 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -34,12 +34,13 @@ module ActionDispatch # :nodoc: DEFAULT_HEADERS = { "Cache-Control" => "no-cache" } attr_accessor :request - attr_accessor :session, :assigns, :template, :layout + attr_accessor :assigns, :template, :layout attr_accessor :redirected_to, :redirected_to_method_params attr_writer :header alias_method :headers=, :header= + delegate :session, :to => :request delegate :default_charset, :to => 'ActionController::Base' def initialize |