You can achieve this from another way and improve a lot. 
```js
  // current flie
  $("a.receipt-cancel").click( function(event) {
    if ($('#receipt_check_ids').val() != "") {
      $.ajax({
        type: "DELETE",
        url: "/checks/" + $('#receipt_check_ids').val(),
        dataType: "json",
      })
    }
  });

//_sub_header file
...
%a.receipt-cancel{ href: "#{options_documents_path}" }
        %i.icon-remove-sign.icon-2x
        = t('.cancel')
```
This way you don't need the js-routes gem, that  it's unnecessary and makes more complex the js in the Project