Skip to content
Browse files

Autoload ActionDispatch::Request::Session to avoid circular require.

  • Loading branch information...
1 parent 2b6f566 commit 8ce6b0c8493f4d88bba67fa5661fd2f4f1f6f032 @pixeltrix pixeltrix committed May 13, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 actionpack/lib/action_dispatch/http/request.rb
View
3 actionpack/lib/action_dispatch/http/request.rb
@@ -6,7 +6,6 @@
require 'active_support/core_ext/string/access'
require 'active_support/inflector'
require 'action_dispatch/http/headers'
-require 'action_dispatch/request/session'
require 'action_controller/metal/exceptions'
module ActionDispatch
@@ -18,6 +17,8 @@ class Request < Rack::Request
include ActionDispatch::Http::Upload
include ActionDispatch::Http::URL
+ autoload :Session, 'action_dispatch/request/session'
+
LOCALHOST = Regexp.union [/^127\.0\.0\.\d{1,3}$/, /^::1$/, /^0:0:0:0:0:0:0:1(%.*)?$/]
ENV_METHODS = %w[ AUTH_TYPE GATEWAY_INTERFACE

0 comments on commit 8ce6b0c

Please sign in to comment.
Something went wrong with that request. Please try again.