aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/abstract/helpers.rb
diff options
context:
space:
mode:
authorYehuda Katz and Carl Lerche <wycats@gmail.com>2009-04-07 14:57:18 -0700
committerYehuda Katz and Carl Lerche <wycats@gmail.com>2009-04-07 14:57:18 -0700
commitc1aa5b0e14cd4bd27a5d8bd85cf7c36fa5911830 (patch)
treec4d08a6227e5a39cb65726fa40c2c54516068d24 /actionpack/lib/action_controller/abstract/helpers.rb
parent9c8eaf8e254cf8ccaa6ecae3fdf1f468fbb60db8 (diff)
downloadrails-c1aa5b0e14cd4bd27a5d8bd85cf7c36fa5911830.tar.gz
rails-c1aa5b0e14cd4bd27a5d8bd85cf7c36fa5911830.tar.bz2
rails-c1aa5b0e14cd4bd27a5d8bd85cf7c36fa5911830.zip
Add depends_on, use, and setup to abstract up ideas about module inheritance.
Diffstat (limited to 'actionpack/lib/action_controller/abstract/helpers.rb')
-rw-r--r--actionpack/lib/action_controller/abstract/helpers.rb23
1 files changed, 12 insertions, 11 deletions
diff --git a/actionpack/lib/action_controller/abstract/helpers.rb b/actionpack/lib/action_controller/abstract/helpers.rb
index 1947c360b8..1f0b38417b 100644
--- a/actionpack/lib/action_controller/abstract/helpers.rb
+++ b/actionpack/lib/action_controller/abstract/helpers.rb
@@ -1,17 +1,18 @@
module AbstractController
module Helpers
-
- def self.included(klass)
- klass.class_eval do
- extend ClassMethods
- unless self < ::AbstractController::Renderer
- raise "You need to include AbstractController::Renderer before including " \
- "AbstractController::Helpers"
- end
- extlib_inheritable_accessor :master_helper_module
- self.master_helper_module = Module.new
- end
+ depends_on Renderer
+
+ setup do
+ extlib_inheritable_accessor :master_helper_module
+ self.master_helper_module = Module.new
end
+
+ # def self.included(klass)
+ # klass.class_eval do
+ # extlib_inheritable_accessor :master_helper_module
+ # self.master_helper_module = Module.new
+ # end
+ # end
def _action_view
@_action_view ||= begin