diff options
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/helpers/asset_tag_helper.rb | 2 | ||||
-rw-r--r-- | actionview/test/actionpack/controller/render_test.rb | 2 | ||||
-rw-r--r-- | actionview/test/template/lookup_context_test.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb index e506c782d6..fa46a22500 100644 --- a/actionview/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb @@ -136,7 +136,7 @@ module ActionView tag( "link", "rel" => tag_options[:rel] || "alternate", - "type" => tag_options[:type] || Mime::Type.lookup_by_extension(type.to_s).to_s, + "type" => tag_options[:type] || Mime[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 ) diff --git a/actionview/test/actionpack/controller/render_test.rb b/actionview/test/actionpack/controller/render_test.rb index 9409775fef..bdb9e0397b 100644 --- a/actionview/test/actionpack/controller/render_test.rb +++ b/actionview/test/actionpack/controller/render_test.rb @@ -466,7 +466,7 @@ class TestController < ApplicationController end def render_content_type_from_body - response.content_type = Mime::RSS + response.content_type = Mime[:rss] render body: "hello world!" end diff --git a/actionview/test/template/lookup_context_test.rb b/actionview/test/template/lookup_context_test.rb index 1184cf7da8..2e3a3f9bae 100644 --- a/actionview/test/template/lookup_context_test.rb +++ b/actionview/test/template/lookup_context_test.rb @@ -52,7 +52,7 @@ class LookupContextTest < ActiveSupport::TestCase end test "handles explicitly defined */* formats fallback to :js" do - @lookup_context.formats = [:js, Mime::Type[:ALL]] + @lookup_context.formats = [:js, Mime::ALL] assert_equal [:js, *Mime::SET.symbols], @lookup_context.formats end |