Skip to content

Instantly share code, notes, and snippets.

@tommyblue
Created September 6, 2013 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommyblue/6460998 to your computer and use it in GitHub Desktop.
Save tommyblue/6460998 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>MyApp</title>
<%= stylesheet_link_tag "application", media: "all" %>
<%= yield :stylesheets %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
<%= javascript_include_tag "application" %>
<%= yield :javascripts %>
</body>
</html>
<table>
[...]
</table>
<!-- my content -->
<% content_for :javascripts do %>
<%= javascript_include_tag "custom_js" %>
<script>
// put js here
</script>
<% end %>
<% content_for :stylesheets do %>
<%= stylesheet_link_tag "custom_css_file" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment