I have followed this article https://www.bootrails.com/blog/rails-7-bootstrap-5-tutorial/ to display a bootstrap alert on my rails 7.0 app.
The alert is been displayed but not been dismissed when I click on the close button. Here is my code inside application.html.erb
<% flash.each do |key, value| %>
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<%= value %>
</div>
<% end %>