Require-js commonly uses an attribute called "data-main" on the script tag. Is there a way to tell Rails' javascript tag helpers to add it, or should I just do it the old-fashioned way?
<%= javascript_include_tag 'application', :'data-main' => 42 %>
renders as:
<script data-main="42" src="/javascripts/application.js?1301333790" type="text/javascript"></script>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.