aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-07-06 08:58:34 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-07-06 08:58:34 +0000
commit744058b6997edbd323e888e19e58d6573eb60ddf (patch)
tree047b5a0945f6f8b3a99589e2fddf034edf8e7f40 /actionpack/lib/action_controller
parent2186ed83dd693ce3c70381f017bfd9ef0b47d1b7 (diff)
downloadrails-744058b6997edbd323e888e19e58d6573eb60ddf.tar.gz
rails-744058b6997edbd323e888e19e58d6573eb60ddf.tar.bz2
rails-744058b6997edbd323e888e19e58d6573eb60ddf.zip
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
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/cgi_process.rb39
1 files changed, 23 insertions, 16 deletions
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