Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3 assets add ?body=1

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?

like image 648
Nick Ginanto Avatar asked Oct 19 '11 11:10

Nick Ginanto


1 Answers

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.

like image 52
Richard Hulse Avatar answered Nov 02 '22 07:11

Richard Hulse



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!