I am having a problem in using AJAX in Rails(I am trying for the first
time), and I am pretty sure it is because of routing. This is my code
As far I knew the URL’s were supposed to be like “/controller/action/
id” but when I do “/controller/action” it throws an error “Could not
find model with ID=action” and that is why my AJAX calls aren’t
working. I do not wish to use form_for_remote or link_to_remote as I
need to make these calls from JS.
Could someone please help me out.