From 91474828761e3ae67499a0152e07a4bf9a28ebdb Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Fri, 22 Dec 2023 00:49:32 +0100 Subject: [PATCH] Use JsRoutes in .js.erb files --- app/assets/javascripts/editor/participantsupport.js.erb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/assets/javascripts/editor/participantsupport.js.erb b/app/assets/javascripts/editor/participantsupport.js.erb index f2745242..c176f206 100644 --- a/app/assets/javascripts/editor/participantsupport.js.erb +++ b/app/assets/javascripts/editor/participantsupport.js.erb @@ -19,13 +19,11 @@ CodeOceanEditorFlowr = { '', getInsights: function () { - <% self.class.include Rails.application.routes.url_helpers %> - var flowrUrl = '<%= insights_path %>'; var stackOverflowUrl = 'https://api.stackexchange.com/2.2/search/advanced'; return jQuery.ajax({ dataType: "json", - url: flowrUrl, + url: Routes.insights_path(), data: {} }).then(function (insights) { var stackoverflowRequests = _.map(insights, function (insight) {