I'm having trouble implementing a confirm dialogue box on a button, as it's not working and throwing an error:
Here is my code snippet:
<%= link_to restaurant_survey_path(@restaurant, id: @survey.id), data: { confirm: 'Are you sure?' }, method: :delete do %>
<i class="fas fa-times" style="color: gray; margin-top: 1%; font-size: 20px;"></i>
<% end %>
The error I'm encountering can be seen here:
https://i.stack.imgur.com/E5TJi.jpg
In addition, this is my application.js
:
//= require jquery
//= require jquery-ujs
//= require bootstrap
//= require rails-ujs
//= require_tree .
And this is my application.html.erb
:
...
</head>
<body>
<%= render "/shared/flashes" %>
<%= yield %>
<%= javascript_include_tag 'application' %>
<%= javascript_pack_tag 'application' %>
<script>AOS.init();</script>
</body>