Merge pull request #23085 from maclover7/fix-17030

Remove AV dependence on AP's Mime
This commit is contained in:
Kasper Timm Hansen 2016-01-17 20:30:55 +01:00
commit d14db3700d
4 changed files with 4 additions and 4 deletions

@ -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