Last active
August 29, 2015 14:01
-
-
Save aakashd/82c4e7ff51cfa60ebd04 to your computer and use it in GitHub Desktop.
how to include page specific javascript code after application.js
This file contains 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
<div class='content'> | |
<!-- your application code, which requires some JS --> | |
</div> | |
<% content_for :javascript do %> | |
<script type="text/javascript"> | |
$(function () { | |
$('th').tooltip(); | |
}); | |
</script> | |
<% end %> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=9"> | |
<title><%= application_title %></title> | |
<%= render :partial => 'layouts/header_meta_content' %> | |
<%= stylesheet_link_tag 'application', media: 'all' %> | |
<meta charset="UTF-8"> | |
<%= csrf_meta_tags %> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!--[if lte IE 9]> | |
<%= javascript_include_tag 'modernizr' %> | |
<![endif]--> | |
</head> | |
<body class="background-light"> | |
<div class="container"> | |
<div class="content"> | |
<%= render :partial => 'layouts/nav_bar' %> | |
<%= render :partial => 'application/alert' %> | |
<%= yield %> | |
</div> | |
</div> | |
<%= javascript_include_tag 'application' %> | |
<%= yield :javascript %> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment