Rails 3 assets add ?body=1
-
27-10-2019 - |
题
If I view the source there is a ?body=1 added to all assets (css and js) like this
<script src="/assets/jquery.livequery.js?body=1" type="text/javascript"></script>
what is it? and why?
解决方案
The body param is required by Sprockets and is used internally to determine whether to send back the asset directly (an image or other binary file) or the contents of the file (js and css). While these are technically the same thing, Sprockets treats bundles of files and static files in different ways.
不隶属于 StackOverflow