Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

240
Views
Syntax for Bootstrap 5 integration to rails 7 helpers (AJAX Calls)

I just installed a new rails 7 application bundled with bootstrap 5 and im working on an AJAX call for a modal. I am using Turbo-Hotwire. Im looking to not directly use the bootstrap button, but one inline with a rails helper.

The older version, before adding data-bs-toggle would look something like this:

<%= link_to new_modal_path, class='btn btn-success', data: { toggle: "modal", target: "#newModal" } do %>
  Test Button
<% end %>

--Modal--

<div class="modal fade" id="newModal" tabindex="-1" arial-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      Example content
    </div>
  </div>
</div>

Im guessing it is in the data-bs: / togglg-bs or something similar? Any thoughts with Bootstrap 5?

Method above does call a button, but links to the page, and does not call the modal.

Bootstrap 5 button call is data-bs-toggle, however i would prefer not to use the boostrap <button>.

Thanks for the help!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!