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/session/active_record_store.rb,
lib/action_controller/cgi_ext/cookie_performance_fix.rb
Overview
Defined Under Namespace
Modules: QueryExtension
Classes: Cookie, 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_nil ⇒ Object
10
|
# File 'lib/action_controller/cgi_ext/cgi_ext.rb', line 10
alias :escapeHTML_fail_on_nil :escapeHTML
|
Instance Method Details
#parameters ⇒ Object
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_parameters ⇒ Object
#redirect(where) ⇒ Object
31
32
33
34
35
36
|
# File 'lib/action_controller/cgi_ext/cgi_ext.rb', line 31
def redirect(where)
({
"Status" => "302 Moved",
"location" => "#{where}"
})
end
|
#request_parameters ⇒ Object
#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
|