Skip to content

Commit bde3960

Browse files
MrSerthdependabot[bot]
authored andcommitted
Fix Rubocop offenses
1 parent ffb6dbd commit bde3960

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/controllers/tasks_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def import_start # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
107107
end
108108
rescue ProformaXML::ProformaError => e
109109
messages = prettify_import_errors(e)
110-
flash[:alert] = messages
110+
flash.now[:alert] = messages
111111
render json: {
112112
status: 'failure',
113113
message: t('.error', error: messages),
@@ -209,9 +209,9 @@ def export_external_confirm
209209

210210
def generate_test
211211
GptService::GenerateTests.call(task: @task, openai_api_key: current_user.openai_api_key)
212-
flash[:notice] = I18n.t('tasks.task_service.gpt_generate_tests.successful_generation')
212+
flash.now[:notice] = I18n.t('tasks.task_service.gpt_generate_tests.successful_generation')
213213
rescue Gpt::Error => e
214-
flash[:alert] = e.localized_message
214+
flash.now[:alert] = e.localized_message
215215
ensure
216216
redirect_to @task
217217
end

config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Application < Rails::Application
3131
# config.eager_load_paths << Rails.root.join("extras")
3232

3333
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
34-
config.i18n.load_path += Dir[Rails.root.join('config/locales/**/*.{rb,yml}')]
34+
config.i18n.load_path += Rails.root.glob('config/locales/**/*.{rb,yml}')
3535
# config.i18n.default_locale = :de
3636
config.i18n.available_locales = %i[de en]
3737

0 commit comments

Comments
 (0)