aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-09-23 23:37:31 -0500
committerJoshua Peek <josh@joshpeek.com>2009-09-23 23:37:31 -0500
commit3fb623fa90fae619485c788d5addc776eedc2f12 (patch)
tree916a21592c5d7af7c86b9fe1201be81b619ffea4 /actionpack/lib/action_dispatch/middleware
parent542ddde5d49d9152c544f1f7483852dc8d4fc925 (diff)
downloadrails-3fb623fa90fae619485c788d5addc776eedc2f12.tar.gz
rails-3fb623fa90fae619485c788d5addc776eedc2f12.tar.bz2
rails-3fb623fa90fae619485c788d5addc776eedc2f12.zip
SessionRestoreError belongs in AD
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r--actionpack/lib/action_dispatch/middleware/session/abstract_store.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
index a8768633cc..c5c06f74a2 100644
--- a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
+++ b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
@@ -2,6 +2,9 @@ require 'rack/utils'
module ActionDispatch
module Session
+ class SessionRestoreError < StandardError #:nodoc:
+ end
+
class AbstractStore
ENV_SESSION_KEY = 'rack.session'.freeze
ENV_SESSION_OPTIONS_KEY = 'rack.session.options'.freeze
@@ -19,7 +22,7 @@ module ActionDispatch
def session_id
ActiveSupport::Deprecation.warn(
- "ActionController::Session::AbstractStore::SessionHash#session_id " +
+ "ActionDispatch::Session::AbstractStore::SessionHash#session_id " +
"has been deprecated. Please use request.session_options[:id] instead.", caller)
@env[ENV_SESSION_OPTIONS_KEY][:id]
end
@@ -62,7 +65,7 @@ module ActionDispatch
def data
ActiveSupport::Deprecation.warn(
- "ActionController::Session::AbstractStore::SessionHash#data " +
+ "ActionDispatch::Session::AbstractStore::SessionHash#data " +
"has been deprecated. Please use #to_hash instead.", caller)
to_hash
end
@@ -98,7 +101,7 @@ module ActionDispatch
# Note that the regexp does not allow $1 to end with a ':'
$1.constantize
rescue LoadError, NameError => const_error
- raise ActionController::SessionRestoreError, "Session contains objects whose class definition isn't available.\nRemember to require the classes for all objects kept in the session.\n(Original exception: #{const_error.message} [#{const_error.class}])\n"
+ raise ActionDispatch::SessionRestoreError, "Session contains objects whose class definition isn't available.\nRemember to require the classes for all objects kept in the session.\n(Original exception: #{const_error.message} [#{const_error.class}])\n"
end
retry