From 11c3a888c2ae94c94a78350199b3ee7715b6f46b Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Wed, 19 Jan 2022 08:57:07 +0100 Subject: [PATCH] Fix rubocop offenses --- app/controllers/code_ocean/files_controller.rb | 2 +- app/controllers/exercises_controller.rb | 2 +- app/helpers/application_helper.rb | 2 +- app/helpers/pagedown_form_builder.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/code_ocean/files_controller.rb b/app/controllers/code_ocean/files_controller.rb index 77ce4212..79331f6a 100644 --- a/app/controllers/code_ocean/files_controller.rb +++ b/app/controllers/code_ocean/files_controller.rb @@ -28,7 +28,7 @@ module CodeOcean yield if block_given? path = options[:path].try(:call) || @object respond_with_valid_object(format, notice: t('shared.object_created', model: @object.class.model_name.human), -path: path, status: :created) + path: path, status: :created) else filename = "#{@object.path || ''}/#{@object.name || ''}#{@object.file_type.try(:file_extension) || ''}" format.html do diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index 8f50385d..1e3d7258 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -21,7 +21,7 @@ class ExercisesController < ApplicationController only: %i[import_exercise import_uuid_check export_external_confirm export_external_check] skip_after_action :verify_authorized, only: %i[import_exercise import_uuid_check export_external_confirm] skip_after_action :verify_policy_scoped, only: %i[import_exercise import_uuid_check export_external_confirm], -raise: false + raise: false def authorize! authorize(@exercise || @exercises) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4411bd54..4f46e81c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -45,7 +45,7 @@ module ApplicationHelper def progress_bar(value) tag.div(class: value ? 'progress' : 'disabled progress') do tag.div(value ? "#{value}%" : '', 'aria-valuemax': 100, 'aria-valuemin': 0, -'aria-valuenow': value, class: 'progress-bar progress-bar-striped', role: 'progressbar', style: "width: #{[value || 0, 100].min}%;") + 'aria-valuenow': value, class: 'progress-bar progress-bar-striped', role: 'progressbar', style: "width: #{[value || 0, 100].min}%;") end end diff --git a/app/helpers/pagedown_form_builder.rb b/app/helpers/pagedown_form_builder.rb index 6b1ec5c6..ed4a31c4 100644 --- a/app/helpers/pagedown_form_builder.rb +++ b/app/helpers/pagedown_form_builder.rb @@ -28,7 +28,7 @@ class PagedownFormBuilder < ActionView::Helpers::FormBuilder def wmd_preview @template.tag.div(nil, class: 'wmd-preview', - id: "wmd-preview-#{base_id}") + id: "wmd-preview-#{base_id}") end def show_wmd_preview?