提交 d14db370 编写于 作者: K Kasper Timm Hansen

Merge pull request #23085 from maclover7/fix-17030

Remove AV dependence on AP's Mime
......@@ -136,7 +136,7 @@ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {})
tag(
"link",
"rel" => tag_options[:rel] || "alternate",
"type" => tag_options[:type] || Mime[type].to_s,
"type" => tag_options[:type] || Template::Types[type].to_s,
"title" => tag_options[:title] || type.to_s.upcase,
"href" => url_options.is_a?(Hash) ? url_for(url_options.merge(:only_path => false)) : url_options
)
......
......@@ -67,7 +67,7 @@ class DetailsKey #:nodoc:
def self.get(details)
if details[:formats]
details = details.dup
details[:formats] &= Mime::SET.symbols
details[:formats] &= Template::Types.symbols
end
@details_keys[details] ||= new
end
......
......@@ -84,7 +84,7 @@ def render_to_body(options = {})
end
def rendered_format
Mime[lookup_context.rendered_format]
Template::Types[lookup_context.rendered_format]
end
private
......
......@@ -48,7 +48,7 @@ def self.[](type)
type_klass[type]
end
def symbols
def self.symbols
type_klass::SET.symbols
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册