Support legacy foo.erb names even though we now ignore .erb as well as
incorrectly putting part of the path in the template name instead of the
prefix.
# File actionpack/lib/action_view/lookup_context.rb, line 153
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