Answer the question
In order to leave comments, you need to log in
Why is the ajax request not being executed?
Hello Habr!
There is a link
= link_to "Редактировать", id: "load_formForItem", data: {ajax_path: :getFormForEditItems}
$ ->
$('#load_formForItem').click ->
projects_path = $('#load_formForItem').data('ajax-path')
$.ajax projects_path,
type: 'POST'
dataType: 'script'
Answer the question
In order to leave comments, you need to log in
= link_to "Редактировать", '#', id: "load_formForItem", data: {ajax_path: :getFormForEditItems}
You, apparently, have a typo: you pass ajax_path to the helper, in JS you use ajax-path
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question