From 8b03539f01ada894ed0a961fee6f0a6bc6ae8631 Mon Sep 17 00:00:00 2001 From: Absurdon Date: Sun, 22 Apr 2018 17:09:06 +0200 Subject: [PATCH] Use path helper instead of url helper to ensure not loading non https scripts in production --- app/views/custom_urls/_controls.js.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/custom_urls/_controls.js.erb b/app/views/custom_urls/_controls.js.erb index be3769e..907b1ff 100644 --- a/app/views/custom_urls/_controls.js.erb +++ b/app/views/custom_urls/_controls.js.erb @@ -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;