Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
210 changes: 60 additions & 150 deletions src/classes/AbstractController/Base.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,11 @@ <h2 id="attributes">Attributes</h2>
<h2 id="class-public-methods">Class Public methods</h2>

<div class="method">
<h3 id="method-c-abstract-21">

abstract!()

</h3>
<h3 id="method-c-abstract-21"><code><b>abstract!</b>()</code></h3>


<div class="description">
<p>Define a controller as abstract. See <a href="Base.html#method-c-internal_methods"><code>internal_methods</code></a> for more details.</p>
</div>

<div class="description">
<p>Define a controller as abstract. See <a href="Base.html#method-c-internal_methods"><code>internal_methods</code></a> for more details.</p>
</div>



Expand All @@ -184,17 +178,11 @@ <h3 id="method-c-abstract-21">
</div>

<div class="method">
<h3 id="method-c-action_methods">

action_methods()

</h3>
<h3 id="method-c-action_methods"><code><b>action_methods</b>()</code></h3>


<div class="description">
<p>A <code>Set</code> of method names that should be considered actions. This includes all public instance methods on a controller, less any internal methods (see <a href="Base.html#method-c-internal_methods"><code>internal_methods</code></a>), adding back in any methods that are internal, but still exist on the class itself.</p>
</div>

<div class="description">
<p>A <code>Set</code> of method names that should be considered actions. This includes all public instance methods on a controller, less any internal methods (see <a href="Base.html#method-c-internal_methods"><code>internal_methods</code></a>), adding back in any methods that are internal, but still exist on the class itself.</p>
</div>



Expand Down Expand Up @@ -228,17 +216,11 @@ <h3 id="method-c-action_methods">
</div>

<div class="method">
<h3 id="method-c-clear_action_methods-21">

clear_action_methods!()

</h3>
<h3 id="method-c-clear_action_methods-21"><code><b>clear_action_methods!</b>()</code></h3>


<div class="description">
<p><a href="Base.html#method-c-action_methods"><code>action_methods</code></a> are cached and there is sometimes a need to refresh them. <a href="Base.html#method-c-clear_action_methods-21"><code>::clear_action_methods!</code></a> allows you to do that, so next time you run <a href="Base.html#method-c-action_methods"><code>action_methods</code></a>, they will be recalculated.</p>
</div>

<div class="description">
<p><a href="Base.html#method-c-action_methods"><code>action_methods</code></a> are cached and there is sometimes a need to refresh them. <a href="Base.html#method-c-clear_action_methods-21"><code>::clear_action_methods!</code></a> allows you to do that, so next time you run <a href="Base.html#method-c-action_methods"><code>action_methods</code></a>, they will be recalculated.</p>
</div>



Expand All @@ -263,24 +245,18 @@ <h3 id="method-c-clear_action_methods-21">
</div>

<div class="method">
<h3 id="method-c-controller_path">

controller_path()

</h3>
<h3 id="method-c-controller_path"><code><b>controller_path</b>()</code></h3>


<div class="description">
<p>Returns the full controller name, underscored, without the ending Controller.</p>
<div class="description">
<p>Returns the full controller name, underscored, without the ending Controller.</p>

<pre><code>class MyApp::MyPostsController &lt; AbstractController::Base

end

MyApp::MyPostsController.controller_path # =&gt; &quot;my_app/my_posts&quot;
</code></pre>
</div>

</div>



Expand All @@ -305,17 +281,11 @@ <h3 id="method-c-controller_path">
</div>

<div class="method">
<h3 id="method-c-internal_methods">

internal_methods()

</h3>
<h3 id="method-c-internal_methods"><code><b>internal_methods</b>()</code></h3>


<div class="description">
<p>A list of all internal methods for a controller. This finds the first abstract superclass of a controller, and gets a list of all public instance methods on that abstract class. Public instance methods of a controller would normally be considered action methods, so methods declared on abstract classes are being removed. (<a href="../ActionController/Metal.html"><code>ActionController::Metal</code></a> and <a href="../ActionController/Base.html"><code>ActionController::Base</code></a> are defined as abstract)</p>
</div>

<div class="description">
<p>A list of all internal methods for a controller. This finds the first abstract superclass of a controller, and gets a list of all public instance methods on that abstract class. Public instance methods of a controller would normally be considered action methods, so methods declared on abstract classes are being removed. (<a href="../ActionController/Metal.html"><code>ActionController::Metal</code></a> and <a href="../ActionController/Base.html"><code>ActionController::Base</code></a> are defined as abstract)</p>
</div>



Expand Down Expand Up @@ -348,17 +318,11 @@ <h3 id="method-c-internal_methods">
</div>

<div class="method">
<h3 id="method-c-method_added">

method_added(name)

</h3>
<h3 id="method-c-method_added"><code><b>method_added</b>(name)</code></h3>


<div class="description">
<p>Refresh the cached <a href="Base.html#method-c-action_methods"><code>action_methods</code></a> when a new action_method is added.</p>
</div>

<div class="description">
<p>Refresh the cached <a href="Base.html#method-c-action_methods"><code>action_methods</code></a> when a new action_method is added.</p>
</div>



Expand All @@ -384,17 +348,11 @@ <h3 id="method-c-method_added">
</div>

<div class="method">
<h3 id="method-c-supports_path-3F">

supports_path?()

</h3>
<h3 id="method-c-supports_path-3F"><code><b>supports_path?</b>()</code></h3>


<div class="description">
<p>Returns true if the given controller is capable of rendering a path. A subclass of <a href="Base.html"><code>AbstractController::Base</code></a> may return false. An Email controller for example does not support paths, only full URLs.</p>
</div>

<div class="description">
<p>Returns true if the given controller is capable of rendering a path. A subclass of <a href="Base.html"><code>AbstractController::Base</code></a> may return false. An Email controller for example does not support paths, only full URLs.</p>
</div>



Expand Down Expand Up @@ -423,17 +381,11 @@ <h3 id="method-c-supports_path-3F">
<h2 id="instance-public-methods">Instance Public methods</h2>

<div class="method">
<h3 id="method-i-action_methods">

action_methods()

</h3>
<h3 id="method-i-action_methods"><code><b>action_methods</b>()</code></h3>


<div class="description">
<p>Delegates to the class’s <a href="Base.html#method-c-action_methods"><code>::action_methods</code></a>.</p>
</div>

<div class="description">
<p>Delegates to the class’s <a href="Base.html#method-c-action_methods"><code>::action_methods</code></a>.</p>
</div>



Expand All @@ -458,17 +410,11 @@ <h3 id="method-i-action_methods">
</div>

<div class="method">
<h3 id="method-i-action_name">

action_name

</h3>
<h3 id="method-i-action_name"><code><b>action_name</b></code></h3>


<div class="description">
<p>Returns the name of the action this controller is processing.</p>
</div>

<div class="description">
<p>Returns the name of the action this controller is processing.</p>
</div>



Expand All @@ -492,24 +438,18 @@ <h3 id="method-i-action_name">
</div>

<div class="method">
<h3 id="method-i-available_action-3F">

available_action?(action_name)

</h3>
<h3 id="method-i-available_action-3F"><code><b>available_action?</b>(action_name)</code></h3>


<div class="description">
<p>Returns true if a method for the action is available and can be dispatched, false otherwise.</p>
<div class="description">
<p>Returns true if a method for the action is available and can be dispatched, false otherwise.</p>

<p>Notice that <code>action_methods.include?(&quot;foo&quot;)</code> may return false and <code>available_action?(&quot;foo&quot;)</code> returns true because this method considers actions that are also available through other means, for example, implicit render ones.</p>

<h4 id="method-i-available_action-3F-label-Parameters">Parameters</h4>
<ul><li>
<p><a href="Base.html#method-i-action_name"><code>action_name</code></a> - The name of an action to be tested</p>
</li></ul>
</div>

</div>



Expand All @@ -534,17 +474,11 @@ <h4 id="method-i-available_action-3F-label-Parameters">Parameters</h4>
</div>

<div class="method">
<h3 id="method-i-controller_path">

controller_path()

</h3>
<h3 id="method-i-controller_path"><code><b>controller_path</b>()</code></h3>


<div class="description">
<p>Delegates to the class’s <a href="Base.html#method-c-controller_path"><code>::controller_path</code></a>.</p>
</div>

<div class="description">
<p>Delegates to the class’s <a href="Base.html#method-c-controller_path"><code>::controller_path</code></a>.</p>
</div>



Expand All @@ -569,17 +503,11 @@ <h3 id="method-i-controller_path">
</div>

<div class="method">
<h3 id="method-i-formats">

formats

</h3>
<h3 id="method-i-formats"><code><b>formats</b></code></h3>


<div class="description">
<p>Returns the formats that can be processed by the controller.</p>
</div>

<div class="description">
<p>Returns the formats that can be processed by the controller.</p>
</div>



Expand All @@ -603,17 +531,11 @@ <h3 id="method-i-formats">
</div>

<div class="method">
<h3 id="method-i-performed-3F">

performed?()

</h3>
<h3 id="method-i-performed-3F"><code><b>performed?</b>()</code></h3>


<div class="description">
<p>Tests if a response body is set. Used to determine if the <code>process_action</code> callback needs to be terminated in <a href="Callbacks.html"><code>AbstractController::Callbacks</code></a>.</p>
</div>

<div class="description">
<p>Tests if a response body is set. Used to determine if the <code>process_action</code> callback needs to be terminated in <a href="Callbacks.html"><code>AbstractController::Callbacks</code></a>.</p>
</div>



Expand All @@ -638,19 +560,13 @@ <h3 id="method-i-performed-3F">
</div>

<div class="method">
<h3 id="method-i-process">

process(action, ...)

</h3>
<h3 id="method-i-process"><code><b>process</b>(action, ...)</code></h3>


<div class="description">
<p>Calls the action going through the entire Action Dispatch stack.</p>
<div class="description">
<p>Calls the action going through the entire Action Dispatch stack.</p>

<p>The actual method that is called is determined by calling method_for_action. If no method can handle the action, then an <a href="ActionNotFound.html"><code>AbstractController::ActionNotFound</code></a> error is raised.</p>
</div>

</div>



Expand Down Expand Up @@ -683,17 +599,11 @@ <h3 id="method-i-process">
</div>

<div class="method">
<h3 id="method-i-response_body">

response_body

</h3>
<h3 id="method-i-response_body"><code><b>response_body</b></code></h3>


<div class="description">
<p>Returns the body of the HTTP response sent by the controller.</p>
</div>

<div class="description">
<p>Returns the body of the HTTP response sent by the controller.</p>
</div>



Expand Down
24 changes: 5 additions & 19 deletions src/classes/AbstractController/Caching.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,9 @@ <h2 id="included-modules">Included Modules</h2>
<h2 id="instance-public-methods">Instance Public methods</h2>

<div class="method">
<h3 id="method-i-view_cache_dependencies">

view_cache_dependencies()

</h3>
<h3 id="method-i-view_cache_dependencies"><code><b>view_cache_dependencies</b>()</code></h3>


<div class="description">

</div>




Expand Down Expand Up @@ -141,17 +133,11 @@ <h3 id="method-i-view_cache_dependencies">
<h2 id="instance-private-methods">Instance Private methods</h2>

<div class="method">
<h3 id="method-i-cache">

cache(key, options = {}, &amp;block)

</h3>
<h3 id="method-i-cache"><code><b>cache</b>(key, options = {}, &amp;block)</code></h3>


<div class="description">
<p>Convenience accessor.</p>
</div>

<div class="description">
<p>Convenience accessor.</p>
</div>



Expand Down
Loading