diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-03-08 15:57:07 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-03-08 16:50:00 -0800 |
commit | 146a5305d56b636d2fd2c2a09a58f5f3edc2d9c0 (patch) | |
tree | cef0ad169ffaf123d914c426ae1933e47db648e8 | |
parent | 60bbf16bfd60493c05bf9c9c70ec962a0c482155 (diff) | |
download | rails-146a5305d56b636d2fd2c2a09a58f5f3edc2d9c0.tar.gz rails-146a5305d56b636d2fd2c2a09a58f5f3edc2d9c0.tar.bz2 rails-146a5305d56b636d2fd2c2a09a58f5f3edc2d9c0.zip |
Add memoizing to AD::Request
-rwxr-xr-x | actionpack/lib/action_dispatch/http/request.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 56a2b9bf6a..ea9f0f99c2 100755 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -30,6 +30,14 @@ module ActionDispatch METHOD end + def self.new(env) + if request = env["action_dispatch.request"] && request.instance_of?(self) + return request + end + + super + end + def key?(key) @env.key?(key) end |