我的布局视图中有这个
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "jquery-1.10.1.min" %>
<%= javascript_include_tag "bootstrap.min" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
为什么页面呈现时我会得到所有这些?
<link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" />
<script src="/assets/jquery-1.10.1.min.js" type="text/javascript"></script>
<script src="/assets/bootstrap.min.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script>
<script src="/assets/LZA/LZA.js?body=1" type="text/javascript"></script>
<script src="/assets/LZA/MapKit.js?body=1" type="text/javascript"></script>
<script src="/assets/LZA/Torch.js?body=1" type="text/javascript"></script>
<script src="/assets/LZA/cordova-2.6.0.js?body=1" type="text/javascript"></script>
<script src="/assets/LZA/jquery-1.10.1.min.js?body=1" type="text/javascript"></script>
<script src="/assets/LZA/jquery-1.9.1.min.js?body=1" type="text/javascript"></script>
<script src="/assets/LZA/jquery.form.js?body=1" type="text/javascript"></script>
<script src="/assets/LZA/jquery.mobile-1.3.1.min.js?body=1" type="text/javascript"></script>
<script src="/assets/apps.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap.min.js?body=1" type="text/javascript"></script>
<script src="/assets/home.js?body=1" type="text/javascript"></script>
<script src="/assets/simulator.js?body=1" type="text/javascript"></script>
<script src="/assets/webservice.js?body=1" type="text/javascript"></script>
<script src="/assets/application.js?body=1" type="text/javascript"></script>
我所做的只是将一些.css
和.js
文件添加到文件夹中,以便我可以在站点的其他地方使用它们...