Can you help me figure out why my AJAX call is not reaching success after hours of troubleshooting? It seems like the issue lies in the dataType that the AJAX call is expecting or receiving (JavaScript vs JSON). Unfortunately, I'm not sure how to address this problem.
When examining the console.log output of my error, I observe:
abort: ƒ ( statusText )
always: ƒ ()
complete: ƒ ()
done: ƒ ()
error: ƒ ()
fail: ƒ ()
getAllResponseHeaders: ƒ ()
getResponseHeader: ƒ ( key )
...
Code
reservations/new.html.erb
<%= simple_form_for [@hotel, @reservation] do |f|%>
// Form fields here
<% end %>
script for reservations/new.html.erb
<script>
// JavaScript code here
</script>
hotels_controller
// Controller logic here
hotels/rooms_availability.js.erb
// JavaScript logic for availability here
Print screen of form html
// HTML form layout
logs
// Console logs and errors