Class AbstractController::Base
In: lib/abstract_controller/base.rb
Parent: Object

AbstractController::Base is a low-level API. Nobody should be using it directly, and subclasses (like ActionController::Base) are expected to provide their own render method, since rendering means different things depending on the context.

Methods

Included Modules

ActiveSupport::Configurable

External Aliases

abstract -> abstract?
send -> send_action
  Actually call the method associated with the action. Override this method if you wish to change how action methods are called, not to add additional behavior around it. For example, you would override send_action if you want to inject arguments into the method.

Attributes

abstract  [R] 

Public Class methods

Define a controller as abstract. See internal_methods for more details.

A list of method names that should be considered actions. This includes all public instance methods on a controller, less any internal methods (see internal_methods), adding back in any methods that are internal, but still exist on the class itself. Finally, hidden_actions are removed.

Returns

  • array - A list of all methods that should be considered actions.

action_methods are cached and there is sometimes need to refresh them. clear_action_methods! allows you to do that, so next time you run action_methods, they will be recalculated

Returns the full controller name, underscored, without the ending Controller. For instance, MyApp::MyPostsController would return "my_app/my_posts" for controller_name.

Returns

  • string

The list of hidden actions to an empty array. Defaults to an empty array. This can be modified by other modules or subclasses to specify particular actions as hidden.

Returns

  • array - An array of method names that should not be considered actions.

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 we are removing those methods on classes declared as abstract (ActionController::Metal and ActionController::Base are defined as abstract)

Public Instance methods

Delegates to the class’ controller_path

Calls the action going through the entire action dispatch stack.

The actual method that is called is determined by calling method_for_action. If no method can handle the action, then an ActionNotFound error is raised.

Returns

  • self

[Validate]