Changeset 9185
- Timestamp:
- 04/01/08 05:38:29 (3 months ago)
- Files:
-
- trunk/actionmailer/lib/action_mailer/helpers.rb (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionmailer/lib/action_mailer/helpers.rb
r7719 r9185 23 23 module ClassMethods 24 24 # Makes all the (instance) methods in the helper module available to templates rendered through this controller. 25 # See ActionView::Helpers (link:classes/ActionView/Helpers.html) for more about making your own helper modules 25 # See ActionView::Helpers (link:classes/ActionView/Helpers.html) for more about making your own helper modules 26 26 # available to the templates. 27 27 def add_template_helper(helper_module) #:nodoc: … … 46 46 file_name = arg.to_s.underscore + '_helper' 47 47 class_name = file_name.camelize 48 48 49 49 begin 50 50 require_dependency(file_name) … … 88 88 end 89 89 90 private 90 private 91 91 def inherited_with_helper(child) 92 92 inherited_without_helper(child) … … 94 94 child.master_helper_module = Module.new 95 95 child.master_helper_module.send! :include, master_helper_module 96 child.helper child.name. underscore96 child.helper child.name.to_s.underscore 97 97 rescue MissingSourceFile => e 98 98 raise unless e.is_missing?("helpers/#{child.name.underscore}_helper") 99 99 end 100 end 100 end 101 101 end 102 102