All Questions
529 questions
6
votes
1
answer
2k
views
Bootstrap JS not working with Rails Importmap
I have a Rails 7 App that I'm using Importmap with. I'm loading the Bootstrap JS via the gem and docs so my config/importmap.rb has:
pin "popper", to: 'popper.js', preload: true
pin "...
4
votes
2
answers
3k
views
Memoize a Bootstrap5 modal inside a Stimulus controller
I've a form within a modal defined in a partial:
<!-- app/views/events/new_event_modal.html.erb -->
<div data-controller="events--form">
<div class="modal fade" ...
2
votes
0
answers
198
views
Rails6/Bootstrap Chartkick chart not rendering in dynamically loaded Modal
My Chartkick chart is not rendering when opening in a dynamically loaded (from XHR request) Bootstrap Modal.
This is the partial for the chart
<div class="card bg-light">
<div ...
2
votes
0
answers
496
views
Bootstrap Modals Not Working With New JS Bundler Rails
I can not get the Bootstrap Modal to work using the new esbuild JSBundler / CSSBundler set up in Rails, the button just does nothing with no errors (using example as test).
Using the GoRails Jumpstart ...
0
votes
1
answer
39
views
How do you make a link_to text clickable to activate a Boostrap collapsible?
I have this code for a collapsible header text and a caret besides it which collapses/uncollapses a div .
<span><strong>"Weekly"</strong></span> <a class="...
0
votes
1
answer
579
views
Dynamic modals using Bootstrap 5.0.0 and Webpacker
Since Bootstrap 5.0.0, it seems Bootstrap JS file must be loaded at the end of the <body> in order to render dynamically loaded Modals (and maybe other features). Check this issue on GitHub
...
2
votes
0
answers
127
views
How do I do require in Rails 6.1? How do I require Bootstrap JavaScripts in rails 6 and higher?
I am trying to require these Bootstrap JavaScripts in my project using rails 6.
//= require jquery
//= require jquery_ujs
//= require bootstrap-sprockets
//= require turbolinks
//= require_tree .
in ...
0
votes
1
answer
182
views
Boostrap (5) Javascript is not working after package.json revision (Ruby on Rails 6)
I was trying to update some versions in my package.json (basically Bootstrap 5 final that I already had in beta) which I did. An then, some more. At some point, all the bootstrap JS stoped working. I ...
1
vote
0
answers
108
views
Uncaught TypeError: $(...).hsSideNav is not a function, with webpacker in Rails 6
I have a Rails 6 application working with the asset pipeline, which I'm trying to move to webpacker in order to use turbo. So far I've managed to correctly set up turbo. The app uses some bootstrap ...
0
votes
0
answers
226
views
Bootstrap Modal window doesn't render model validation errors
I have a basic modal window on my home page that renders a form to create a new Post.
I have a length validation in the Post model and want the form to display an error if it doesn't meet the minimum ...
1
vote
1
answer
6k
views
Can't toggle. Bootstrap 5 js not initialized properly?
I have an issue with my Bootstrap 5.0.0-beta2 implementation. I can expand my navbars and accordions, but not collapse them.
It seems to be a problem with the initialization of the js.
Because if I ...
0
votes
1
answer
366
views
Rails 6 Bootstrap 4 Modal not closing on submit
Open Modal is working fine, but not close modal.
Here my files:
in client.haml ( the client layout)
= link_to t('.mail to admin'), blame_path(@admin), remote: true
routes.rb
get "blame/:admin&...
1
vote
1
answer
1k
views
I am using bootstrap and everything is working except for tooltips
Okay so my javascript is definitely not on point, and I am really stuck with integrating tooltips into my rails application. I have done everything that bootstrap is telling me to do in any possible ...
4
votes
2
answers
4k
views
Bootstrap 5 tooltip, popover and toasts not working in Ruby on Rails 6
I'm using a Railsbytes script to install bootstrap 5 alpha; https://railsbytes.com/public/templates/VB0s5v.
However, I can't get any of the tooltips and popovers to work. Not sure even where I should ...
1
vote
1
answer
153
views
Bootstrap JS apparently being overwritten by webpack
Description
I noticed when using a JavaScript file (e.g. app/javascript/packs/custom.js), Bootstrap jquery events like shown.bs.modal, does not work. I want to use different js files for different ...