module ActionView::LookupContext::ViewPaths

def normalize_name(name, prefixes) #:nodoc:

:nodoc:
name instead of the prefix.
as well as incorrectly putting part of the path in the template
Support legacy foo.erb names even though we now ignore .erb
def normalize_name(name, prefixes) #:nodoc:
  name  = name.to_s.sub(handlers_regexp) do |match|
    ActiveSupport::Deprecation.warn "Passing a template handler in the template name is deprecated. " \
      "You can simply remove the handler name or pass render :handlers => [:#{match[1..-1]}] instead.", caller
    ""
  end
  prefixes = nil if prefixes.blank?
  parts    = name.split('/')
  name     = parts.pop
  return name, prefixes || [""] if parts.empty?
  parts    = parts.join('/')
  prefixes = prefixes ? prefixes.map { |p| "#{p}/#{parts}" } : [parts]
  return name, prefixes
end