提交 98076af2 编写于 作者: J Jon Moss

Remove ActionView dependence on ActionPack's Mime implementation

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