mirror of https://github.com/rails/rails
Remove ActionView dependence on ActionPack's Mime implementation
This commit is contained in:
parent
2683dcc60e
commit
98076af2ef
|
@ -136,7 +136,7 @@ module ActionView
|
|||
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 @@ module ActionView
|
|||
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 @@ module ActionView
|
|||
end
|
||||
|
||||
def rendered_format
|
||||
Mime[lookup_context.rendered_format]
|
||||
Template::Types[lookup_context.rendered_format]
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -48,7 +48,7 @@ module ActionView
|
|||
type_klass[type]
|
||||
end
|
||||
|
||||
def symbols
|
||||
def self.symbols
|
||||
type_klass::SET.symbols
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue