Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source
Show
Ignore:
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_view/base.rb

    r8187 r8211  
    277277    # is made available as local variables. 
    278278    def render_file(template_path, use_full_path = true, local_assigns = {}) #:nodoc: 
     279      if defined?(ActionMailer::Base) && controller.is_a?(ActionMailer::Base) && !template_path.include?("/") 
     280        raise ActionViewError, <<-END_ERROR 
     281Due to changes in ActionMailer, you need to provide the mailer_name along with the template name. 
     282 
     283  render "user_mailer/signup" 
     284  render :file => "user_mailer/signup" 
     285 
     286If you are rendering a subtemplate, you must now use controller-like partial syntax: 
     287 
     288  render :partial => 'signup' # no mailer_name necessary 
     289        END_ERROR 
     290      end 
     291       
    279292      @first_render ||= template_path 
    280293      template_path_without_extension, template_extension = path_and_extension(template_path)