1
0
Fork 0
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:
Aaron Patterson 2012-08-09 11:21:58 -07:00
parent 37a764b8e0
commit 6a3d4695f0
3 changed files with 22 additions and 0 deletions

View file

@ -4,6 +4,11 @@ require 'active_support/core_ext/hash/indifferent_access'
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

View file

@ -38,6 +38,17 @@ module ActionDispatch
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

View file

@ -87,6 +87,12 @@ module ActionDispatch
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