0
@@ -5,15 +5,19 @@ module ActionView #:nodoc:
0
attr_reader :handler, :path, :extension, :filename, :method
0
- def initialize(view, path, use_full_path, locals = {})
0
+ def initialize(view, path, use_full_path = nil, locals = {})
0
+ unless use_full_path == nil
0
+ ActiveSupport::Deprecation.warn("use_full_path option has been deprecated and has no affect.", caller)
0
@paths = view.view_paths
0
- @path = TemplateFile.from_path(path
, !use_full_path)
0
+ @path = TemplateFile.from_path(path
)
0
@view.first_render ||= @path.to_s
0
@source = nil # Don't read the source until we know that it is required
0
- set_extension_and_file_name
(use_full_path)0
+ set_extension_and_file_name
0
@handler = self.class.handler_class_for_extension(@extension).new(@view)
0
@@ -63,25 +67,24 @@ module ActionView #:nodoc:
0
- def set_extension_and_file_name
(use_full_path)0
+ def set_extension_and_file_name
0
@extension = @path.extension
0
- @path = @view.send(:template_file_from_name, @path)
0
- raise_missing_template_exception unless @path
0
- @extension = @path.extension
0
- if @path = @paths.find_template_file_for_path(path)
0
- @filename = @path.full_path
0
- @extension = @path.extension
0
- @filename = @path.full_path
0
+ @path = @view.send(:template_file_from_name, @path)
0
+ raise_missing_template_exception unless @path
0
+ @extension = @path.extension
0
- raise_missing_template_exception if @filename.blank?
0
+ if p = @paths.find_template_file_for_path(path)
0
+ @filename = @path.full_path
0
+ @extension = @path.extension
0
+ raise_missing_template_exception if @filename.blank?
0
+ @filename = @original_path
0
+ raise_missing_template_exception unless File.exist?(@filename)
0
def raise_missing_template_exception
Comments
No one has commented yet.