diff options
Diffstat (limited to 'actionpack/lib/abstract_controller/base.rb')
-rw-r--r-- | actionpack/lib/abstract_controller/base.rb | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb index fd6a46fbec..97a9eec144 100644 --- a/actionpack/lib/abstract_controller/base.rb +++ b/actionpack/lib/abstract_controller/base.rb @@ -1,11 +1,15 @@ require 'erubis' +require 'set' require 'active_support/configurable' require 'active_support/descendants_tracker' require 'active_support/core_ext/module/anonymous' module AbstractController - class Error < StandardError; end - class ActionNotFound < StandardError; end + class Error < StandardError #:nodoc: + end + + class ActionNotFound < StandardError #:nodoc: + end # <tt>AbstractController::Base</tt> is a low-level API. Nobody should be # using it directly, and subclasses (like ActionController::Base) are @@ -42,8 +46,8 @@ module AbstractController controller.public_instance_methods(true) end - # The list of hidden actions to an empty array. Defaults to an - # empty array. This can be modified by other modules or subclasses + # 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 @@ -59,7 +63,7 @@ module AbstractController # itself. Finally, #hidden_actions are removed. # # ==== Returns - # * <tt>array</tt> - A list of all methods that should be considered actions. + # * <tt>set</tt> - A set of all methods that should be considered actions. def action_methods @action_methods ||= begin # All public instance methods of this class, including ancestors @@ -72,7 +76,7 @@ module AbstractController hidden_actions.to_a # Clear out AS callback method pollution - methods.reject { |method| method =~ /_one_time_conditions/ } + Set.new(methods.reject { |method| method =~ /_one_time_conditions/ }) end end @@ -85,7 +89,7 @@ module AbstractController # Returns the full controller name, underscored, without the ending Controller. # For instance, MyApp::MyPostsController would return "my_app/my_posts" for - # controller_name. + # controller_path. # # ==== Returns # * <tt>string</tt> |