method

set_extension_and_file_name

rails latest stable - Class: ActionView::Template

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.1.0) is shown here.

set_extension_and_file_name(use_full_path)
private

No documentation available.

# File actionpack/lib/action_view/template.rb, line 62
    def set_extension_and_file_name(use_full_path)
      @path_without_extension, @extension = @finder.path_and_extension(@path)
      if use_full_path
        if @extension
          @filename = @finder.pick_template(@path_without_extension, @extension)
        else
          @extension = @finder.pick_template_extension(@path).to_s
          raise_missing_template_exception unless @extension
          
          @filename = @finder.pick_template(@path, @extension)
          @extension = @extension.gsub(/^.+\./, '') # strip off any formats
        end
      else
        @filename = @path
      end

      raise_missing_template_exception if @filename.blank?
    end