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

Changeset 6506

Show
Ignore:
Timestamp:
04/08/07 16:53:37 (3 years ago)
Author:
rick
Message:

Fix WSOD due to modification of a formatted template extension so that requests to templates like 'foo.html.erb' fail on the second hit. [Rick]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r6505 r6506  
    11*SVN* 
     2 
     3* Fix WSOD due to modification of a formatted template extension so that requests to templates like 'foo.html.erb' fail on the second hit.  [Rick] 
    24 
    35* Fix WSOD when template compilation fails [Rick] 
  • trunk/actionpack/lib/action_view/base.rb

    r6505 r6506  
    253253          template_extension = pick_template_extension(template_path).to_s 
    254254          template_file_name = full_template_path(template_path, template_extension) 
    255           template_extension.gsub!(/^\w+\./, '') # strip off any formats 
     255          template_extension = template_extension.gsub(/^\w+\./, '') # strip off any formats 
    256256        end 
    257257      else 
     
    268268          raise e 
    269269        else 
    270           raise TemplateError.new(find_base_path_for("#{template_path_without_extension}.#{template_extension}"), template_file_name, @assigns, template_source, e) 
     270          raise TemplateError.new(find_base_path_for("#{template_path_without_extension}.#{template_extension}") || view_paths.first, template_file_name, @assigns, template_source, e) 
    271271        end 
    272272      end 
     
    583583          end 
    584584 
    585           raise TemplateError.new(extract_base_path_from(file_name) || @view_paths.first, file_name || template, @assigns, template, e) 
     585          raise TemplateError.new(extract_base_path_from(file_name) || view_paths.first, file_name || template, @assigns, template, e) 
    586586        end 
    587587