diff --git a/Gemfile.lock b/Gemfile.lock index 2414dbba5..e94944fd1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -454,10 +454,10 @@ GEM rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.25.1) + rubocop-rails (2.26.0) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.33.0, < 2.0) + rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rspec (3.1.0) rubocop (~> 1.61) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 8126bfd9d..548e14da5 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -107,7 +107,7 @@ def import_start # rubocop:disable Metrics/AbcSize, Metrics/MethodLength end rescue ProformaXML::ProformaError => e messages = prettify_import_errors(e) - flash[:alert] = messages + flash.now[:alert] = messages render json: { status: 'failure', message: t('.error', error: messages), @@ -209,9 +209,9 @@ def export_external_confirm def generate_test GptService::GenerateTests.call(task: @task, openai_api_key: current_user.openai_api_key) - flash[:notice] = I18n.t('tasks.task_service.gpt_generate_tests.successful_generation') + flash.now[:notice] = I18n.t('tasks.task_service.gpt_generate_tests.successful_generation') rescue Gpt::Error => e - flash[:alert] = e.localized_message + flash.now[:alert] = e.localized_message ensure redirect_to @task end diff --git a/config/application.rb b/config/application.rb index 8ff5965f6..c3ef48a7f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -31,7 +31,7 @@ class Application < Rails::Application # config.eager_load_paths << Rails.root.join("extras") # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - config.i18n.load_path += Dir[Rails.root.join('config/locales/**/*.{rb,yml}')] + config.i18n.load_path += Rails.root.glob('config/locales/**/*.{rb,yml}') # config.i18n.default_locale = :de config.i18n.available_locales = %i[de en]