私の Rails アプリでは、assets/javascripts の javascript ファイルで、最初の行は
console.log("This javascript file is included")
. My application.html では、head の直後にこれを含めます。
<script type = "text/javascript">
console.log("Logging from the application.html")
</script>
どのビューにも javascript ファイルを明示的に含めていませんが、コンソールには次のように表示されます。
This javascript file is included.
Logging from the application.html