Skip to content

Instantly share code, notes, and snippets.

@eladmeidar
Created August 10, 2009 11:35
Show Gist options
  • Save eladmeidar/165148 to your computer and use it in GitHub Desktop.
Save eladmeidar/165148 to your computer and use it in GitHub Desktop.
## layout
<head>
<title>bla</title>
<%= javascript_include_tag 'some_js_i_want_everywhere' %>
<%= yield(:head) %>
</head>
## view 1
<% content_for(:head) do %>
<%= javascript_include_tag 'js_only_for_view_1' %>
<% end %>
## view 2
<% content_for(:head) do %>
<%= javascript_include_tag 'js_only_for_view_2' %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment