<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Class: ActionController::Dispatcher</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> <script type="text/javascript"> // <![CDATA[ function popupCode( url ) { window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") } function toggleCode( id ) { if ( document.getElementById ) elem = document.getElementById( id ); else if ( document.all ) elem = eval( "document.all." + id ); else return false; elemStyle = elem.style; if ( elemStyle.display != "block" ) { elemStyle.display = "block" } else { elemStyle.display = "none" } return true; } // Make codeblocks hidden by default document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" ) // ]]> </script> </head> <body> <div id="classHeader"> <table class="header-table"> <tr class="top-aligned-row"> <td><strong>Class</strong></td> <td class="class-name-in-header">ActionController::Dispatcher</td> </tr> <tr class="top-aligned-row"> <td><strong>In:</strong></td> <td> <a href="../../files/lib/action_controller/dispatcher_rb.html"> lib/action_controller/dispatcher.rb </a> <br /> </td> </tr> <tr class="top-aligned-row"> <td><strong>Parent:</strong></td> <td> <a href="../Object.html"> Object </a> </td> </tr> </table> </div> <!-- banner header --> <div id="bodyContent"> <div id="contextContent"> <div id="description"> <p> Dispatches requests to the appropriate controller and takes care of reloading the app after each request when Dependencies.load? is true. </p> </div> </div> <div id="method-list"> <h3 class="section-bar">Methods</h3> <div class="name-list"> <a href="#M000324">_call</a> <a href="#M000323">call</a> <a href="#M000319">cleanup_application</a> <a href="#M000314">define_dispatcher_callbacks</a> <a href="#M000321">dispatch</a> <a href="#M000315">dispatch</a> <a href="#M000322">dispatch_cgi</a> <a href="#M000325">flush_logger</a> <a href="#M000320">new</a> <a href="#M000318">reload_application</a> <a href="#M000317">run_prepare_callbacks</a> <a href="#M000316">to_prepare</a> </div> </div> </div> <!-- if includes --> <div id="includes"> <h3 class="section-bar">Included Modules</h3> <div id="includes-list"> <span class="include-name">ActiveSupport::Callbacks</span> </div> </div> <div id="section"> <!-- if method_list --> <div id="methods"> <h3 class="section-bar">Public Class methods</h3> <div id="method-M000319" class="method-detail"> <a name="M000319"></a> <div class="method-heading"> <a href="Dispatcher.src/M000319.html" target="Code" class="method-signature" onclick="popupCode('Dispatcher.src/M000319.html');return false;"> <span class="method-name">cleanup_application</span><span class="method-args">()</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000314" class="method-detail"> <a name="M000314"></a> <div class="method-heading"> <a href="Dispatcher.src/M000314.html" target="Code" class="method-signature" onclick="popupCode('Dispatcher.src/M000314.html');return false;"> <span class="method-name">define_dispatcher_callbacks</span><span class="method-args">(cache_classes)</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000315" class="method-detail"> <a name="M000315"></a> <div class="method-heading"> <a href="Dispatcher.src/M000315.html" target="Code" class="method-signature" onclick="popupCode('Dispatcher.src/M000315.html');return false;"> <span class="method-name">dispatch</span><span class="method-args">(cgi = nil, session_options = CgiRequest::DEFAULT_SESSION_OPTIONS, output = $stdout)</span> </a> </div> <div class="method-description"> <p> DEPRECATE: Remove CGI support </p> </div> </div> <div id="method-M000320" class="method-detail"> <a name="M000320"></a> <div class="method-heading"> <a href="Dispatcher.src/M000320.html" target="Code" class="method-signature" onclick="popupCode('Dispatcher.src/M000320.html');return false;"> <span class="method-name">new</span><span class="method-args">(output = $stdout, request = nil, response = nil)</span> </a> </div> <div class="method-description"> <p> DEPRECATE: Remove arguments, since they are only used by CGI </p> </div> </div> <div id="method-M000318" class="method-detail"> <a name="M000318"></a> <div class="method-heading"> <a href="Dispatcher.src/M000318.html" target="Code" class="method-signature" onclick="popupCode('Dispatcher.src/M000318.html');return false;"> <span class="method-name">reload_application</span><span class="method-args">()</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000317" class="method-detail"> <a name="M000317"></a> <div class="method-heading"> <a href="Dispatcher.src/M000317.html" target="Code" class="method-signature" onclick="popupCode('Dispatcher.src/M000317.html');return false;"> <span class="method-name">run_prepare_callbacks</span><span class="method-args">()</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000316" class="method-detail"> <a name="M000316"></a> <div class="method-heading"> <a href="Dispatcher.src/M000316.html" target="Code" class="method-signature" onclick="popupCode('Dispatcher.src/M000316.html');return false;"> <span class="method-name">to_prepare</span><span class="method-args">(identifier = nil, &block)</span> </a> </div> <div class="method-description"> <p> Add a preparation callback. Preparation callbacks are run before every request in development mode, and before the first request in production mode. </p> <p> An optional identifier may be supplied for the callback. If provided, <a href="Dispatcher.html#M000316">to_prepare</a> may be called again with the same identifier to replace the existing callback. Passing an identifier is a suggested practice if the code adding a preparation block may be reloaded. </p> </div> </div> <h3 class="section-bar">Public Instance methods</h3> <div id="method-M000324" class="method-detail"> <a name="M000324"></a> <div class="method-heading"> <a href="Dispatcher.src/M000324.html" target="Code" class="method-signature" onclick="popupCode('Dispatcher.src/M000324.html');return false;"> <span class="method-name">_call</span><span class="method-args">(env)</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000323" class="method-detail"> <a name="M000323"></a> <div class="method-heading"> <a href="Dispatcher.src/M000323.html" target="Code" class="method-signature" onclick="popupCode('Dispatcher.src/M000323.html');return false;"> <span class="method-name">call</span><span class="method-args">(env)</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000321" class="method-detail"> <a name="M000321"></a> <div class="method-heading"> <a href="Dispatcher.src/M000321.html" target="Code" class="method-signature" onclick="popupCode('Dispatcher.src/M000321.html');return false;"> <span class="method-name">dispatch</span><span class="method-args">()</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000322" class="method-detail"> <a name="M000322"></a> <div class="method-heading"> <a href="Dispatcher.src/M000322.html" target="Code" class="method-signature" onclick="popupCode('Dispatcher.src/M000322.html');return false;"> <span class="method-name">dispatch_cgi</span><span class="method-args">(cgi, session_options)</span> </a> </div> <div class="method-description"> <p> DEPRECATE: Remove CGI support </p> </div> </div> <div id="method-M000325" class="method-detail"> <a name="M000325"></a> <div class="method-heading"> <a href="Dispatcher.src/M000325.html" target="Code" class="method-signature" onclick="popupCode('Dispatcher.src/M000325.html');return false;"> <span class="method-name">flush_logger</span><span class="method-args">()</span> </a> </div> <div class="method-description"> </div> </div> </div> </div> <div id="validator-badges"> <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> </div> </body> </html>