Skip to content

Commit

Permalink
install popperjs with bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
o-200 committed Dec 20, 2024
1 parent 7448fde commit 3ad3572
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/javascript/application.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
import '@hotwired/turbo-rails'
import "controllers"
import * as bootstrap from "bootstrap"
import * as bootstrap from "bootstrap";
import { createPopper } from "@popperjs/core";
2 changes: 2 additions & 0 deletions app/models/podcast.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class Podcast < ApplicationRecord
has_one_attached :photo
has_one_attached :audio

belongs_to :user
end
3 changes: 2 additions & 1 deletion config/importmap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
pin "@hotwired/stimulus", to: "stimulus.min.js"
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js"
pin_all_from "app/javascript/controllers", under: "controllers"
pin "bootstrap", to: "bootstrap.min.js"
pin "bootstrap", to: "https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
pin "@rails/activestorage", to: "https://ga.jspm.io/npm:@rails/activestorage@7.0.2/app/assets/javascripts/activestorage.esm.js"
pin "@popperjs/core", to: "https://ga.jspm.io/npm:@popperjs/core@2.11.8/dist/umd/popper.min.js"
3 changes: 3 additions & 0 deletions vendor/javascript/@popperjs--core.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions vendor/javascript/bootstrap.js

Large diffs are not rendered by default.

0 comments on commit 3ad3572

Please sign in to comment.