Class: CGI

Inherits:
Object show all
Defined in:
lib/action_controller/cgi_ext/cgi_ext.rb,
lib/action_controller/session/drb_store.rb,
lib/action_controller/cgi_ext/raw_post_data_fix.rb,
lib/action_controller/cgi_ext/multipart_progress.rb,
lib/action_controller/session/active_record_store.rb,
lib/action_controller/cgi_ext/cookie_performance_fix.rb

Overview

:nodoc:

Defined Under Namespace

Modules: QueryExtension Classes: Cookie, ProgressIO, Session

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.escapeHTML(string) ⇒ Object


12
13
14
# File 'lib/action_controller/cgi_ext/cgi_ext.rb', line 12

def escapeHTML(string)
  escapeHTML_fail_on_nil(string) unless string.nil?
end

.escapeHTML_fail_on_nilObject


10
# File 'lib/action_controller/cgi_ext/cgi_ext.rb', line 10

alias :escapeHTML_fail_on_nil :escapeHTML

Instance Method Details

#parametersObject

Returns a parameter hash including values from both the request (POST/GET) and the query string with the latter taking precedence.


19
20
21
# File 'lib/action_controller/cgi_ext/cgi_ext.rb', line 19

def parameters
  request_parameters.update(query_parameters)
end

#query_parametersObject


23
24
25
# File 'lib/action_controller/cgi_ext/cgi_ext.rb', line 23

def query_parameters
  CGIMethods.parse_query_parameters(query_string)
end

#redirect(where) ⇒ Object


31
32
33
34
35
36
# File 'lib/action_controller/cgi_ext/cgi_ext.rb', line 31

def redirect(where)
   header({ 
     "Status" => "302 Moved", 
     "location" => "#{where}"
  })
end

#request_parametersObject


27
28
29
# File 'lib/action_controller/cgi_ext/cgi_ext.rb', line 27

def request_parameters
  CGIMethods.parse_request_parameters(params, env_table)
end

#session(parameters = nil) ⇒ Object


38
39
40
41
42
# File 'lib/action_controller/cgi_ext/cgi_ext.rb', line 38

def session(parameters = nil)
  parameters = {} if parameters.nil?
  parameters['database_manager'] = CGI::Session::PStore
  CGI::Session.new(self, parameters)
end