aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-09-30 11:23:00 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-09-30 11:23:00 -0700
commit8f8b7ae1d8fd8b17674d70f5bbddabfc3629a7e7 (patch)
tree31d08a1be0743978fc4bf4c878df7aaffcdc18b2 /railties/lib/rails/application.rb
parentff30db1372f2d6c3ac47fe5b0ffb7ca21390f3c1 (diff)
downloadrails-8f8b7ae1d8fd8b17674d70f5bbddabfc3629a7e7.tar.gz
rails-8f8b7ae1d8fd8b17674d70f5bbddabfc3629a7e7.tar.bz2
rails-8f8b7ae1d8fd8b17674d70f5bbddabfc3629a7e7.zip
only construct one request in an engine
Diffstat (limited to 'railties/lib/rails/application.rb')
-rw-r--r--railties/lib/rails/application.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
index e3716992f5..175965e565 100644
--- a/railties/lib/rails/application.rb
+++ b/railties/lib/rails/application.rb
@@ -156,15 +156,6 @@ module Rails
self
end
- # Implements call according to the Rack API. It simply
- # dispatches the request to the underlying middleware stack.
- def call(env)
- req = ActionDispatch::Request.new env
- env["ORIGINAL_FULLPATH"] = req.fullpath
- env["ORIGINAL_SCRIPT_NAME"] = req.script_name
- super(env)
- end
-
# Reload application routes regardless if they changed or not.
def reload_routes!
routes_reloader.reload!
@@ -517,6 +508,13 @@ module Rails
private
+ def build_request(env)
+ req = super
+ env["ORIGINAL_FULLPATH"] = req.fullpath
+ env["ORIGINAL_SCRIPT_NAME"] = req.script_name
+ req
+ end
+
def build_middleware
config.app_middleware + super
end