diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-05-12 16:13:00 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-05-12 16:13:00 -0300 |
commit | 0048897a417774f7e5a0c8c9e82fc8684f94ebc1 (patch) | |
tree | 8df248dab434bdaac61ea60249d4630958260eed /actionpack/lib/action_controller/abstract/helpers.rb | |
parent | 6c7d8cb8ac9e6b6775e9a54ef0be62dbaab592f5 (diff) | |
parent | 22c5667c2ef46d6723c1805d3adc52dc8e92429b (diff) | |
download | rails-0048897a417774f7e5a0c8c9e82fc8684f94ebc1.tar.gz rails-0048897a417774f7e5a0c8c9e82fc8684f94ebc1.tar.bz2 rails-0048897a417774f7e5a0c8c9e82fc8684f94ebc1.zip |
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/lib/action_controller/abstract/helpers.rb')
-rw-r--r-- | actionpack/lib/action_controller/abstract/helpers.rb | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/actionpack/lib/action_controller/abstract/helpers.rb b/actionpack/lib/action_controller/abstract/helpers.rb index 38e3ce8127..968d3080c1 100644 --- a/actionpack/lib/action_controller/abstract/helpers.rb +++ b/actionpack/lib/action_controller/abstract/helpers.rb @@ -9,13 +9,6 @@ module AbstractController 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 av = super @@ -23,19 +16,19 @@ module AbstractController av end end - + module ClassMethods def inherited(klass) klass.master_helper_module = Module.new klass.master_helper_module.__send__ :include, master_helper_module - + super end - + def add_template_helper(mod) master_helper_module.module_eval { include mod } end - + def helper_method(*meths) meths.flatten.each do |meth| master_helper_module.class_eval <<-ruby_eval, __FILE__, __LINE__ + 1 @@ -45,7 +38,7 @@ module AbstractController ruby_eval end end - + def helper(*args, &blk) args.flatten.each do |arg| case arg @@ -56,5 +49,6 @@ module AbstractController master_helper_module.module_eval(&blk) if block_given? end end + end -end +end
\ No newline at end of file |