In my rails application I have this code
<a data-remote="true" href="#" class: "find_product">Find product</a>
For ajax call I am doing this
$(document).on('click', '.find_product', function(){
$.ajax({
url: "<%= startup_wizard_find_horse_path() %>",
dataType: 'script',
type: 'GET',
data: { box_no: "3"}
});
return false;
});
Now when I click on the above link ajax call is sent to the current page action not to the
startup_wizard_find_horse_path
Why this is happening and how can I make this work?