class ActionView::PathResolver
def extract_handler_and_format_and_variant(path, default_formats)
from the path, or the handler, we should return the array of formats given
Extract handler and formats from path. If a format cannot be a found neither
def extract_handler_and_format_and_variant(path, default_formats) pieces = File.basename(path).split(".") pieces.shift extension = pieces.pop unless extension message = "The file #{path} did not specify a template handler. The default is currently ERB, " \ "but will change to RAW in the future." ActiveSupport::Deprecation.warn message end handler = Template.handler_for_extension(extension) format, variant = pieces.last.split(EXTENSIONS[:variants], 2) if pieces.last format &&= Template::Types[format] [handler, format, variant] end