Use path helper instead of url helper to ensure not loading non https scripts in production

This commit is contained in:
Absurdon 2018-04-22 17:09:06 +02:00
parent 07983b5436
commit 8b03539f01

View file

@ -7,7 +7,7 @@ submitEdit = function (url_id) {
var parent = $('#' + url_id);
var form = parent.find('form');
$.post('<%= custom_urls_url %>/' + url_id, form.serialize())
$.post('<%= custom_urls_path %>/' + url_id, form.serialize())
.done(function (data) {
var nameField = parent.children('.name');
var articleField = parent.children('.article');
@ -28,7 +28,7 @@ deleteUrl = function (url_id) {
if(confirmed) {
$.ajax({
url: '<%= custom_urls_url %>/' + url_id,
url: '<%= custom_urls_path %>/' + url_id,
type: 'DELETE'
}).done(function (data) {
var trID = '#' + url_id;