From 744058b6997edbd323e888e19e58d6573eb60ddf Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 6 Jul 2005 08:58:34 +0000 Subject: Retract the session fix until 0.13.1 to preserve the truthfulness of the book git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1730 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/cgi_process.rb | 39 +++++++++++++++---------- 1 file changed, 23 insertions(+), 16 deletions(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/cgi_process.rb b/actionpack/lib/action_controller/cgi_process.rb index 2f31073055..bb34751f64 100644 --- a/actionpack/lib/action_controller/cgi_process.rb +++ b/actionpack/lib/action_controller/cgi_process.rb @@ -95,22 +95,29 @@ module ActionController #:nodoc: @session["__valid_session"] return @session rescue ArgumentError => e - if e.message =~ %r{undefined class/module (\w+)} - begin - Module.const_missing($1) - rescue LoadError, NameError => e - raise( - ActionController::SessionRestoreError, - "Session contained objects where the class definition wasn't available. " + - "Remember to require classes for all objects kept in the session. " + - "(Original exception: #{e.message} [#{e.class}])" - ) - end - - retry - else - raise - end + # TODO: Uncomment this on 0.13.1 + # if e.message =~ %r{undefined class/module (\w+)} + # begin + # Module.const_missing($1) + # rescue LoadError, NameError => e + # raise( + # ActionController::SessionRestoreError, + # "Session contained objects where the class definition wasn't available. " + + # "Remember to require classes for all objects kept in the session. " + + # "(Original exception: #{e.message} [#{e.class}])" + # ) + # end + # + # retry + # else + # raise + # end + raise( + ActionController::SessionRestoreError, + "Session contained objects where the class definition wasn't available. " + + "Remember to require classes for all objects kept in the session. " + + "(Original exception: #{e.message} [#{e.class}])" + ) end end -- cgit v1.2.3