需要在config/importmap.rb中添加

需要在config/importmap.rb 中添加
pin "jquery", to: "https://code.jquery.com/jquery-3.6.0.min.js", preload: true
pin "bootstrap", to: "https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.min.js"

另外需要在app/javascript/application.js下添加
import  "jquery";
import * as bootstrap from "bootstrap";

0 Comments latest

No comments.