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, formats and variant from path. If a format cannot be found neither
def extract_handler_and_format_and_variant(path, default_formats) pieces = File.basename(path).split(".") pieces.shift extension = pieces.pop unless extension ActiveSupport::Deprecation.warn(<<-MSG.squish) The file #{path} did not specify a template handler. The default is currently ERB, but will change to RAW in the future. MSG 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