Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 9185

Show
Ignore:
Timestamp:
04/01/08 05:38:29 (3 months ago)
Author:
bitsweat
Message:

Ruby 1.9 compat: anonymous class name is nil not now

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionmailer/lib/action_mailer/helpers.rb

    r7719 r9185  
    2323    module ClassMethods 
    2424      # 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 
    2626      # available to the templates. 
    2727      def add_template_helper(helper_module) #:nodoc: 
     
    4646              file_name  = arg.to_s.underscore + '_helper' 
    4747              class_name = file_name.camelize 
    48                  
     48 
    4949              begin 
    5050                require_dependency(file_name) 
     
    8888      end 
    8989 
    90       private  
     90      private 
    9191        def inherited_with_helper(child) 
    9292          inherited_without_helper(child) 
     
    9494            child.master_helper_module = Module.new 
    9595            child.master_helper_module.send! :include, master_helper_module 
    96             child.helper child.name.underscore 
     96            child.helper child.name.to_s.underscore 
    9797          rescue MissingSourceFile => e 
    9898            raise unless e.is_missing?("helpers/#{child.name.underscore}_helper") 
    9999          end 
    100         end         
     100        end 
    101101    end 
    102102