user3213561
user3213561

Reputation: 369

Rails 4 stylesheet_link_tag missing "text/css" in HTML

I'm using the stylesheet_link_tag in rails 4 and the outputted html is missing type='text/css'

I can't seem to find out how to add this to the stylesheet_link_tag.

Upvotes: 2

Views: 512

Answers (2)

mikdiet
mikdiet

Reputation: 10018

You can add type option in your stylesheet_link_tag helper:

= stylesheet_link_tag 'application', type: 'text/css'

Upvotes: 1

Victor
Victor

Reputation: 13368

This should be automatic in your application.html.erb

<head>
  <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
</head>

Upvotes: 1

Related Questions