controller_path 2

controller_path() Instance Public methods Delegates to the class' controller_path

available_action?

available_action?(action_name) Instance Public methods Returns true if a method for the action is available and can be dispatched, false otherwise. Notice that action_methods.include?("foo") may return false and available_action?("foo") returns true because this method considers actions that are also available through other means, for example, implicit render ones. Parameters action_name - The name of an action to be tested Returns TrueClass, FalseClass

action_methods 2

action_methods() Instance Public methods Delegates to the class' action_methods

method_added

method_added(name) Class Public methods Refresh the cached ::action_methods when a new action_method is added.

internal_methods

internal_methods() Class Public methods 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. (ActionController::Metal and ActionController::Base are defined as abstract)

hidden_actions

hidden_actions() Class Public methods The list of hidden actions. 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.

controller_path

controller_path() Class Public methods Returns the full controller name, underscored, without the ending Controller. For instance, MyApp::MyPostsController would return âmy_app/my_postsâ for controller_path. Returns String

clear_action_methods!

clear_action_methods!() Class Public methods ::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

action_methods

action_methods() Class Public methods 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 Set - A set of all methods that should be considered actions.

abstract!

abstract!() Class Public methods Define a controller as abstract. See ::internal_methods for more details.