提交 6a3d4695 编写于 作者: A Aaron Patterson

initialize instance variables

上级 37a764b8
......@@ -4,6 +4,11 @@
module ActionDispatch
module Http
module Parameters
def initialize(env)
super
@symbolized_path_params = nil
end
# Returns both GET and POST \parameters in a single hash.
def parameters
@env["action_dispatch.request.parameters"] ||= begin
......
......@@ -38,6 +38,17 @@ def #{env.sub(/^HTTP_/n, '').downcase} # def accept_charset
METHOD
end
def initialize(env)
super
@method = nil
@request_method = nil
@remote_ip = nil
@original_fullpath = nil
@fullpath = nil
@ip = nil
@uuid = nil
end
def key?(key)
@env.key?(key)
end
......
......@@ -87,6 +87,12 @@ def host_or_subdomain_and_domain(options)
end
end
def initialize(env)
super
@protocol = nil
@port = nil
end
# Returns the complete URL used for this request.
def url
protocol + host_with_port + fullpath
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册