aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller/helpers.rb
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2011-04-25 15:02:41 +0200
committerPiotr Sarnacki <drogus@gmail.com>2011-04-25 15:02:41 +0200
commitd4bea35f1ae458246a9e3bb1c914c5d05b8e9cdf (patch)
tree8fb6c94cd42b25bd38421a6a2d23072bbcfa20f5 /actionpack/lib/abstract_controller/helpers.rb
parent820c0feda33495cfe68add8c3f25adc515ab3e04 (diff)
downloadrails-d4bea35f1ae458246a9e3bb1c914c5d05b8e9cdf.tar.gz
rails-d4bea35f1ae458246a9e3bb1c914c5d05b8e9cdf.tar.bz2
rails-d4bea35f1ae458246a9e3bb1c914c5d05b8e9cdf.zip
Make ActionController::Base.modules_for_helpers and ActionController::Base.all_helpers_from_path public methods
Diffstat (limited to 'actionpack/lib/abstract_controller/helpers.rb')
-rw-r--r--actionpack/lib/abstract_controller/helpers.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/actionpack/lib/abstract_controller/helpers.rb b/actionpack/lib/abstract_controller/helpers.rb
index 20f8601a8e..0ff1c0491a 100644
--- a/actionpack/lib/abstract_controller/helpers.rb
+++ b/actionpack/lib/abstract_controller/helpers.rb
@@ -112,17 +112,6 @@ module AbstractController
default_helper_module! unless anonymous?
end
- private
- # Makes all the (instance) methods in the helper module available to templates
- # rendered through this controller.
- #
- # ==== Parameters
- # * <tt>module</tt> - The module to include into the current helper module
- # for the class
- def add_template_helper(mod)
- _helpers.module_eval { include mod }
- end
-
# Returns a list of modules, normalized from the acceptable kinds of
# helpers with the following behavior:
#
@@ -155,6 +144,17 @@ module AbstractController
end
end
+ private
+ # Makes all the (instance) methods in the helper module available to templates
+ # rendered through this controller.
+ #
+ # ==== Parameters
+ # * <tt>module</tt> - The module to include into the current helper module
+ # for the class
+ def add_template_helper(mod)
+ _helpers.module_eval { include mod }
+ end
+
def default_helper_module!
module_name = name.sub(/Controller$/, '')
module_path = module_name.underscore