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