mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
initialize instance variables
This commit is contained in:
parent
37a764b8e0
commit
6a3d4695f0
3 changed files with 22 additions and 0 deletions
|
@ -4,6 +4,11 @@ require 'active_support/core_ext/hash/indifferent_access'
|
||||||
module ActionDispatch
|
module ActionDispatch
|
||||||
module Http
|
module Http
|
||||||
module Parameters
|
module Parameters
|
||||||
|
def initialize(env)
|
||||||
|
super
|
||||||
|
@symbolized_path_params = nil
|
||||||
|
end
|
||||||
|
|
||||||
# Returns both GET and POST \parameters in a single hash.
|
# Returns both GET and POST \parameters in a single hash.
|
||||||
def parameters
|
def parameters
|
||||||
@env["action_dispatch.request.parameters"] ||= begin
|
@env["action_dispatch.request.parameters"] ||= begin
|
||||||
|
|
|
@ -38,6 +38,17 @@ module ActionDispatch
|
||||||
METHOD
|
METHOD
|
||||||
end
|
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)
|
def key?(key)
|
||||||
@env.key?(key)
|
@env.key?(key)
|
||||||
end
|
end
|
||||||
|
|
|
@ -87,6 +87,12 @@ module ActionDispatch
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def initialize(env)
|
||||||
|
super
|
||||||
|
@protocol = nil
|
||||||
|
@port = nil
|
||||||
|
end
|
||||||
|
|
||||||
# Returns the complete URL used for this request.
|
# Returns the complete URL used for this request.
|
||||||
def url
|
def url
|
||||||
protocol + host_with_port + fullpath
|
protocol + host_with_port + fullpath
|
||||||
|
|
Loading…
Reference in a new issue