mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add memoizing to AD::Request
This commit is contained in:
parent
60bbf16bfd
commit
146a5305d5
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue