1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove ActionView dependence on ActionPack's Mime implementation

This commit is contained in:
Jon Moss 2016-01-16 13:17:59 -05:00
parent 2683dcc60e
commit 98076af2ef
4 changed files with 4 additions and 4 deletions

View file

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

View file

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

View file

@ -84,7 +84,7 @@ module ActionView
end
def rendered_format
Mime[lookup_context.rendered_format]
Template::Types[lookup_context.rendered_format]
end
private

View file

@ -48,7 +48,7 @@ module ActionView
type_klass[type]
end
def symbols
def self.symbols
type_klass::SET.symbols
end
end