提交 e9eaae1a 编写于 作者: J Joost Baaij

fixed capitalization

上级 eaeda503
...@@ -6,8 +6,8 @@ module AbstractController ...@@ -6,8 +6,8 @@ module AbstractController
class Error < StandardError; end class Error < StandardError; end
class ActionNotFound < StandardError; end class ActionNotFound < StandardError; end
# AbstractController is a low-level API. Nobody should be using it directly, # <tt>AbstractController::Base</tt> is a low-level API. Nobody should be
# and subclasses of AbstractController (like ActionController::Base) are # using it directly, and subclasses (like ActionController::Base) are
# expected to provide their own +render+ method, since rendering means # expected to provide their own +render+ method, since rendering means
# different things depending on the context. # different things depending on the context.
class Base class Base
...@@ -40,12 +40,12 @@ def internal_methods ...@@ -40,12 +40,12 @@ def internal_methods
controller.public_instance_methods(true) controller.public_instance_methods(true)
end end
# The list of hidden actions to an empty Array. Defaults to an # The list of hidden actions to an empty array. Defaults to an
# empty Array. This can be modified by other modules or subclasses # empty array. This can be modified by other modules or subclasses
# to specify particular actions as hidden. # to specify particular actions as hidden.
# #
# ==== Returns # ==== Returns
# * <tt>Array</tt> - An array of method names that should not be considered actions. # * <tt>array</tt> - An array of method names that should not be considered actions.
def hidden_actions def hidden_actions
[] []
end end
...@@ -57,7 +57,7 @@ def hidden_actions ...@@ -57,7 +57,7 @@ def hidden_actions
# itself. Finally, #hidden_actions are removed. # itself. Finally, #hidden_actions are removed.
# #
# ==== Returns # ==== Returns
# * <tt>Array</tt> - A list of all methods that should be considered actions. # * <tt>array</tt> - A list of all methods that should be considered actions.
def action_methods def action_methods
@action_methods ||= begin @action_methods ||= begin
# All public instance methods of this class, including ancestors # All public instance methods of this class, including ancestors
...@@ -86,7 +86,7 @@ def clear_action_methods! ...@@ -86,7 +86,7 @@ def clear_action_methods!
# controller_name. # controller_name.
# #
# ==== Returns # ==== Returns
# * <tt>String</tt> # * <tt>string</tt>
def controller_path def controller_path
@controller_path ||= name.sub(/Controller$/, '').underscore unless anonymous? @controller_path ||= name.sub(/Controller$/, '').underscore unless anonymous?
end end
...@@ -185,7 +185,7 @@ def _handle_action_missing ...@@ -185,7 +185,7 @@ def _handle_action_missing
# * <tt>action_name</tt> - An action name to find a method name for # * <tt>action_name</tt> - An action name to find a method name for
# #
# ==== Returns # ==== Returns
# * <tt>String</tt> - The name of the method that handles the action # * <tt>string</tt> - The name of the method that handles the action
# * <tt>nil</tt> - No method name could be found. Raise ActionNotFound. # * <tt>nil</tt> - No method name could be found. Raise ActionNotFound.
def method_for_action(action_name) def method_for_action(action_name)
if action_method?(action_name) then action_name if action_method?(action_name) then action_name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册