Skip to content

Commit d656bd8

Browse files
committed
Chore: Migrate Tubolinks to Turbo
Trubolinks has been replaced by Turbo. The Turbolinks library has been achieved. Resolves #2952
1 parent 918df9d commit d656bd8

File tree

66 files changed

+134
-88
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+134
-88
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ gem 'sprockets-rails'
5353
gem 'telegraf'
5454
gem 'terser', require: false
5555
gem 'tubesock', github: 'openhpi/tubesock'
56-
gem 'turbolinks'
56+
gem 'turbo-rails'
5757
gem 'webauthn'
5858
gem 'zxcvbn-ruby', require: 'zxcvbn'
5959

Gemfile.lock

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,6 @@ GEM
617617
turbo-rails (2.0.13)
618618
actionpack (>= 7.1.0)
619619
railties (>= 7.1.0)
620-
turbolinks (5.2.1)
621-
turbolinks-source (~> 5.2)
622-
turbolinks-source (5.2.0)
623620
tzinfo (2.0.6)
624621
concurrent-ruby (~> 1.0)
625622
unicode-display_width (3.1.4)
@@ -749,7 +746,7 @@ DEPENDENCIES
749746
telegraf
750747
terser
751748
tubesock!
752-
turbolinks
749+
turbo-rails
753750
web-console
754751
webauthn
755752
webmock
@@ -992,8 +989,6 @@ CHECKSUMS
992989
tpm-key_attestation (0.14.0) sha256=d05cc52b397f89c36a7307407e0e84d3ea1c7afce50e0a70b146f8ab17d2bf4b
993990
tubesock (0.2.9)
994991
turbo-rails (2.0.13) sha256=c40ac0a3ccd57c129925c8ac524a5dfd1e17fad080906e2d32135721a8bba22f
995-
turbolinks (5.2.1) sha256=5fea5889c4e2a78a5bd9abda3860c565342b50c6e2593697d5558a08e15cce9c
996-
turbolinks-source (5.2.0) sha256=362a41fa851a22b0f15cf8f944b6c7c5788f645dc1f61ae25478bb25c3bc85d4
997992
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
998993
unicode-display_width (3.1.4) sha256=8caf2af1c0f2f07ec89ef9e18c7d88c2790e217c482bfc78aaa65eadd5415ac1
999994
unicode-emoji (4.0.4) sha256=2c2c4ef7f353e5809497126285a50b23056cc6e61b64433764a35eff6c36532a

app/assets/javascripts/application.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
1111
// about supported directives.
1212
//
13-
//= require turbolinks
1413
//= require rails-timeago
1514
//= require locales/jquery.timeago.de.js
1615
//

app/assets/javascripts/base.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Array.prototype.includes = function(element) {
44

55
window.CodeOcean = {
66
refresh: function() {
7-
Turbolinks.visit(window.location.pathname);
7+
Turbo.visit(window.location.pathname);
88
}
99
};
1010

@@ -24,7 +24,7 @@ $.fn.scrollTo = function(selector) {
2424
}, ANIMATION_DURATION);
2525
};
2626

27-
$(document).on('turbolinks:load', function() {
27+
$(document).on('turbo:load', function() {
2828
// Update all CSRF tokens on the page to reduce InvalidAuthenticityToken errors
2929
// See https://github.com/rails/jquery-ujs/issues/456 for details
3030
$.rails.refreshCSRFTokens();
@@ -66,9 +66,6 @@ $(document).on('turbolinks:load', function() {
6666
});
6767
}
6868

69-
// Enable all tooltips
70-
$('[data-bs-toggle="tooltip"]').tooltip();
71-
7269
// Enable sorttable again, as it is disabled otherwise by Turbolinks
7370
if (sorttable) {
7471
sorttable.init.done = false;

app/assets/javascripts/bootstrap-dropdown-submenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22

33
var subMenusSelector = 'ul.dropdown-menu [data-bs-toggle=dropdown]';
44

app/assets/javascripts/channels/la_exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
if ($.isController('exercises') && $('.teacher_dashboard').isPresent()) {
33

44
const exercise_id = $('.teacher_dashboard').data().exerciseId;

app/assets/javascripts/channels/pg_matching_channel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function () {
1+
$(document).on('turbo:load', function () {
22

33
if ($.isController('programming_groups') && window.location.pathname.includes('programming_groups/new')) {
44
const matching_page = $('#matching');

app/assets/javascripts/channels/synchronized_editor_channel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function () {
1+
$(document).on('turbo:load', function () {
22

33
if (window.location.pathname.includes('/implement')) {
44
var editor = $('#editor');

app/assets/javascripts/codeharbor_link.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
if($.isController('codeharbor_links')) {
33
if ($('.edit_codeharbor_link, .new_codeharbor_link').isPresent()) {
44

app/assets/javascripts/community_solution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22

33
if ($.isController('community_solutions') && $('#community-solution-editor').isPresent()) {
44
CodeOceanEditor.sendEvents = false;

app/assets/javascripts/dashboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
var CHART_START = window.vis ? vis.moment().add(-1, 'minute') : undefined;
33
var DEFAULT_REFRESH_INTERVAL = 5000;
44

app/assets/javascripts/editor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function(event) {
1+
$(document).on('turbo:load', function(event) {
22

33
//Merge all editor components.
44
$.extend(
@@ -13,7 +13,7 @@ $(document).on('turbolinks:load', function(event) {
1313
CodeOceanEditorRequestForComments
1414
);
1515

16-
if ($('#editor').isPresent() && CodeOceanEditor && event.originalEvent.data.url.includes("/implement")) {
16+
if ($('#editor').isPresent() && CodeOceanEditor && event.originalEvent.detail.url.includes("/implement")) {
1717
// This call will (amon other things) initializeEditors and load the content except for the last line
1818
// It must not be called during page navigation. Otherwise, content will be duplicated!
1919
// Search for insertFullLines and Turbolinks reload / cache control

app/assets/javascripts/editor/editor.js.erb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -935,10 +935,6 @@ var CodeOceanEditor = {
935935
$('#output_sidebar').removeClass('output-col').addClass('output-col-collapsed');
936936
},
937937

938-
initializeSideBarTooltips: function () {
939-
$('[data-bs-toggle="tooltip"]').tooltip()
940-
},
941-
942938
initializeDescriptionToggle: function () {
943939
$('#exercise-headline').on('click', this.toggleDescriptionCard.bind(this));
944940
$('a#toggle').on('click', this.toggleDescriptionCard.bind(this));
@@ -1095,7 +1091,6 @@ var CodeOceanEditor = {
10951091
this.initializeSideBarCollapse();
10961092
this.initializeOutputBarToggle();
10971093
this.initializeDescriptionToggle();
1098-
this.initializeSideBarTooltips();
10991094
this.initializeInterventionTimer();
11001095
this.initPrompt();
11011096
this.renderScore();
@@ -1105,10 +1100,10 @@ var CodeOceanEditor = {
11051100
this.initializeDeadlines();
11061101
CodeOceanEditorTips.initializeEventHandlers();
11071102

1108-
window.addEventListener("turbolinks:before-render", App.synchronized_editor?.disconnect.bind(App.synchronized_editor));
1103+
window.addEventListener("turbo:before-render", App.synchronized_editor?.disconnect.bind(App.synchronized_editor));
11091104
window.addEventListener("beforeunload", App.synchronized_editor?.disconnect.bind(App.synchronized_editor));
11101105

1111-
window.addEventListener("turbolinks:before-render", this.autosaveIfChanged.bind(this));
1106+
window.addEventListener("turbo:before-render", this.autosaveIfChanged.bind(this));
11121107
window.addEventListener("beforeunload", this.autosaveIfChanged.bind(this));
11131108
// create autosave when the editor is opened the first time
11141109
this.autosave();

app/assets/javascripts/error_templates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
if ($.isController('error_templates')) {
33
const button = $('#add-attribute').find('button')
44
button.on('click', function () {

app/assets/javascripts/exercise_collections.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
if ($.isController('exercise_collections')) {
33
var dataElement = $('#data');
44
var exerciseList = $('#exercise-list');

app/assets/javascripts/exercise_graphs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
// /exercises/38/statistics good for testing
33

44
if ($.isController('exercises') && $('.graph-functions-2').isPresent()) {

app/assets/javascripts/exercises.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function () {
1+
$(document).on('turbo:load', function () {
22
const TAB_KEY_CODE = 9;
33

44
let execution_environments;
@@ -571,4 +571,4 @@ $(document).on('turbolinks:load', function () {
571571
}
572572

573573

574-
});
574+
});

app/assets/javascripts/external_users.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
const grid = $('#tag-grid');
33

44
if ($.isController('external_users') && grid.isPresent()) {

app/assets/javascripts/file_types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
if ($.isController('file_types')) {
33
const select_tag = $('#file_type_editor_mode');
44

app/assets/javascripts/forms.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
var CHOSEN_OPTIONS = {
33
allow_single_deselect: true,
44
disable_search_threshold: 5,
@@ -50,6 +50,6 @@ $(document).on('turbolinks:load', function() {
5050
});
5151

5252
// Remove some elements before going back to an older site. Otherwise, they might not work.
53-
$(document).on('turbolinks:before-cache', function() {
53+
$(document).on('turbo:before-cache', function() {
5454
$('.chosen-container').remove();
5555
});

app/assets/javascripts/markdown_editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const setResizeBtn = (formInput, editor) => {
192192
});
193193
};
194194

195-
$(document).on("turbolinks:load", function () {
195+
$(document).on("turbo:load", function () {
196196
initializeMarkdownEditors();
197197
disableImageUpload();
198198
});

app/assets/javascripts/programming_groups.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var ProgrammingGroups = {
2626
}
2727
};
2828

29-
$(document).on('turbolinks:load', function () {
29+
$(document).on('turbo:load', function () {
3030
const modal = $('#modal-info-pair-programming');
3131
if (modal.isPresent()) {
3232
ProgrammingGroups.initializeEventHandler();

app/assets/javascripts/request_for_comments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function () {
1+
$(document).on('turbo:load', function () {
22
const exerciseCaption = $('#exercise_caption');
33

44
if (!$.isController('request_for_comments') || !exerciseCaption.isPresent()) {

app/assets/javascripts/shell.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function () {
1+
$(document).on('turbo:load', function () {
22
const ENTER_KEY_CODE = 13;
33

44
const clearOutput = function () {

app/assets/javascripts/statistics_activity_history.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22

33
function manageActivityHistory(prefix) {
44
var containerId = prefix + '-activity-history';

app/assets/javascripts/statistics_graphs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
if ($.isController('statistics') && $('.graph#user-activity').isPresent()) {
33

44
function manageGraph(containerId, url, refreshAfter) {

app/assets/javascripts/submission_statistics.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function(event) {
1+
$(document).on('turbo:load', function(event) {
22
var currentSubmission = 0;
33
var active_file = undefined;
44
var fileTrees = [];
@@ -60,7 +60,7 @@ $(document).on('turbolinks:load', function(event) {
6060
$(fileTrees[index]).show();
6161
};
6262

63-
if ($.isController('exercises') && $('#timeline').isPresent() && event.originalEvent.data.url.includes("/statistics")) {
63+
if ($.isController('exercises') && $('#timeline').isPresent() && event.originalEvent.detail.url.includes("/statistics")) {
6464

6565
var slider = $('#submissions-slider>input');
6666
var submissions = $('#data').data('submissions');

app/assets/javascripts/working_time_graphs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
// /38/statistics good for testing
33

44
if ($.isController('exercises') && $('.working-time-graphs').isPresent()) {

app/javascript/application.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// layout file, like app/views/layouts/application.html.slim
99

1010
// JS
11+
import '@hotwired/turbo-rails'
1112
import 'jquery';
1213
import 'jquery-ujs'
1314
import * as bootstrap from 'bootstrap/dist/js/bootstrap.bundle';
@@ -17,6 +18,7 @@ import * as _ from 'underscore';
1718
import * as d3 from 'd3';
1819
import * as Sentry from '@sentry/browser';
1920
import 'sorttable';
21+
import 'tooltip';
2022
window.bootstrap = bootstrap; // Publish bootstrap in global namespace
2123
window._ = _; // Publish underscore's `_` in global namespace
2224
window.d3 = d3; // Publish d3 in global namespace

app/javascript/tooltip.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const tooltipMap = new WeakMap();
2+
3+
function manageTooltips() {
4+
const selector = '[data-bs-toggle="tooltip"]';
5+
const currentElements = new Set(document.querySelectorAll(selector));
6+
7+
// Dispose tooltips for elements no longer in the DOM
8+
for (const [element, tooltipInstance] of tooltipMap.entries()) {
9+
if (!currentElements.has(element)) {
10+
tooltipInstance.dispose();
11+
tooltipMap.delete(element);
12+
}
13+
}
14+
15+
// Initialize tooltips for new elements
16+
currentElements.forEach((element) => {
17+
if (!tooltipMap.has(element)) {
18+
const instance = new bootstrap.Tooltip(element);
19+
tooltipMap.set(element, instance);
20+
}
21+
});
22+
}
23+
24+
window.addEventListener('turbo:load', manageTooltips);
25+
window.addEventListener('turbo:frame-load', manageTooltips);

app/javascript/webauthn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async function getCredential(publicKey) {
2323
return await get(options);
2424
}
2525

26-
$(document).on('turbolinks:load', function() {
26+
$(document).on('turbo:load', function() {
2727
if ($.isController('webauthn_credentials')) {
2828
form = $('form#new_webauthn_credential');
2929
credentialMethod = createCredential;

app/views/admin/dashboard/show.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- content_for :head do
22
// Force a full page reload, see https://github.com/turbolinks/turbolinks/issues/326.
33
Otherwise, the global variable `vis` might be uninitialized in the assets (race condition)
4-
meta name='turbolinks-visit-control' content='reload'
4+
meta name='turbo-visit-control' content='reload'
55
- append_javascript_pack_tag('vis')
66
- append_stylesheet_pack_tag('vis')
77

app/views/application/_locale_selector.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ li.nav-item.dropdown
44
span.caret
55
ul.dropdown-menu.p-0.mt-1 role='menu'
66
- I18n.available_locales.sort_by {|locale| t("locales.#{locale}") }.each do |locale|
7-
li = link_to(t("locales.#{locale}"), AuthenticatedUrlHelper.add_query_parameters(request.url, locale:), 'data-turbolinks': 'false', class: 'dropdown-item')
7+
li = link_to(t("locales.#{locale}"), AuthenticatedUrlHelper.add_query_parameters(request.url, locale:), 'data-turbo': 'false', class: 'dropdown-item')

app/views/application/_navigation.html.slim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
span.caret
77
ul.dropdown-menu.p-0.mt-1 role='menu'
88
- if current_user.admin?
9-
li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path, class: 'dropdown-item', 'data-turbolinks': 'false') if policy(%i[admin dashboard]).show?
10-
li = link_to(t('breadcrumbs.rails_admin.show'), rails_admin.dashboard_path, class: 'dropdown-item', 'data-turbolinks': 'false') if policy(%i[admin dashboard]).show?
9+
li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path, class: 'dropdown-item', 'data-turbo': 'false') if policy(%i[admin dashboard]).show?
10+
li = link_to(t('breadcrumbs.rails_admin.show'), rails_admin.dashboard_path, class: 'dropdown-item', 'data-turbo': 'false') if policy(%i[admin dashboard]).show?
1111
li = link_to(t('breadcrumbs.statistics.show'), statistics_path, class: 'dropdown-item') if policy(:statistics).show?
1212
li.dropdown-divider role='separator'
1313
= render('navigation_submenu', title: Exercise.model_name.human(count: :other),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- content_for :head do
22
// Force a full page reload, see https://github.com/turbolinks/turbolinks/issues/326.
33
Otherwise, code might not be highlighted correctly (race condition)
4-
meta name='turbolinks-visit-control' content='reload'
4+
meta name='turbo-visit-control' content='reload'
55

66
== render 'form'

app/views/execution_environments/_form.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- content_for :head do
22
// Force a full page reload, see https://github.com/turbolinks/turbolinks/issues/326.
33
Otherwise, code might not be highlighted correctly (race condition)
4-
meta name='turbolinks-visit-control' content='reload'
4+
meta name='turbo-visit-control' content='reload'
55
- append_javascript_pack_tag('toast-ui')
66
- append_stylesheet_pack_tag('toast-ui')
77

app/views/execution_environments/show.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ h1.d-inline-block = @execution_environment
55
ul.dropdown-menu.dropdown-menu-end role='menu'
66
li = link_to(t('execution_environments.index.synchronize.button'), sync_to_runner_management_execution_environment_path(@execution_environment), method: :post, class: 'dropdown-item') if policy(@execution_environment).sync_to_runner_management?
77
li = link_to(t('execution_environments.index.shell'), shell_execution_environment_path(@execution_environment), class: 'dropdown-item') if policy(@execution_environment).shell?
8-
li = link_to(t('shared.statistics'), statistics_execution_environment_path(@execution_environment), 'data-turbolinks': 'false', class: 'dropdown-item') if policy(@execution_environment).statistics?
8+
li = link_to(t('shared.statistics'), statistics_execution_environment_path(@execution_environment), 'data-turbo': 'false', class: 'dropdown-item') if policy(@execution_environment).statistics?
99
li = link_to(t('shared.destroy'), @execution_environment, data: {confirm: t('shared.confirm_destroy')}, method: :delete, class: 'dropdown-item') if policy(@execution_environment).destroy?
1010

1111
= row(label: 'execution_environment.name', value: @execution_environment.name)

app/views/execution_environments/statistics.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ h1 = @execution_environment
2121
- if wts then average_time = wts['average_time'] else 0 # rubocop:disable Lint/ElseLayout
2222
- if wts then stddev_time = wts['stddev_time'] else 0 # rubocop:disable Lint/ElseLayout
2323
tr
24-
td = link_to_if policy(exercise).statistics?, exercise.title, controller: 'exercises', action: 'statistics', id: exercise.id, 'data-turbolinks': 'false'
24+
td = link_to_if policy(exercise).statistics?, exercise.title, controller: 'exercises', action: 'statistics', id: exercise.id, 'data-turbo': 'false'
2525
td = us['contributors']
2626
td = us['average_score'].to_f.round(4)
2727
td = us['maximum_score'].to_f.round(2)

0 commit comments

Comments
 (0)