- Defined in:
the methods defined in this module will be injected into the Controller class passed to Anorexic (using the `route` or `shared_route` commands), and will be available for the controller to use within it's methods.
for some reason, the documentation ignores the following additional attributes, which are listed here:
the HTTPRequest object containing all the data from the HTTP request. If a WebSocket connection was established, the `request` object will continue to contain the HTTP request establishing the connection (cookies, parameters sent and other information).
any parameters sent with the request (short-cut for `request.params`), will contain any GET or POST form data sent (including file upload and JSON format support).
a temporary cookie-jar, good for one request. this is a short-cut for the `response.flash` which handles this magical cookie style.
the HTTPResponse *OR* the WSResponse object that formats the response and sends it. use `response << data`. This object can be used to send partial data (such as headers, or partial html content) in blocking mode as well as sending data in the default non-blocking mode.
a copy of the parameters used to create the host and service which accepted the request and created this instance of the controller class.
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
17 18 19 20
# File 'lib/anorexic/handlers/controller_magic.rb', line 17 def self.included base base.send :include, base.extend end