<% content_for :head do %>
<%= javascript_include_tag "http://code.jquery.com/jquery-latest.min.js" %>
<% end %>
它不起作用。
如何在head标签中插入html?
谢谢。
最佳答案
你有<%= yield :head %>
吗在你的里面<head>
标签(可能在您的 layouts/application.html.erb 中)?不?然后添加它:)。
关于ruby-on-rails - content_for head 标签不起作用(ruby on rails),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23710127/