Reputation: 4461
<% content_for :head do %>
<%= javascript_include_tag "http://code.jquery.com/jquery-latest.min.js" %>
<% end %>
It doesn't work.
How to insert html into head tag?
Thanks.
Upvotes: 5
Views: 2177
Reputation: 6213
Do you have <%= yield :head %>
inside your <head>
tag (probably in your layouts/application.html.erb)? No? Then add it :).
Upvotes: 10