Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
publicJavaScript-files from の前にフォルダから JavaScriptをロードする方法はありますassets/javascriptか?
public
assets/javascript
レイアウトで引き続きクラシックjavascript_include_tagを使用できます。
javascript_include_tag
in_public.jsパブリック フォルダーにファイルがあるとします。
in_public.js
<%= javascript_include_tag "/in_public" %>
もちろん。追加するだけ
//= require_tree public
前にファイルの先頭に
//= require_tree .