Created
December 27, 2017 18:46
-
-
Save ro31337/34a65b57f7e1f9c7b7cc954119e2e2a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Your views: | |
=== show.html.erb === | |
<% content_for :header do | |
stylesheet_link_tag 'blabla' | |
end %> | |
<% content_for :header do | |
javascript_include_tag 'blabla' | |
end %> | |
<div> | |
... actual view goes here ... | |
</div> | |
=== | |
Your layout (note the line 26): | |
=== app/views/layouts/application.html.erb === | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>App</title> | |
<%= csrf_meta_tags %> | |
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> | |
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> | |
<%= content_for(:header) %> | |
</head> | |
<body> | |
<%= yield %> | |
</body> | |
</html> | |
=== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment