Skip to content

Commit

Permalink
Fix Rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSerth committed Sep 10, 2024
1 parent 3267d49 commit 3a02052
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/controllers/tasks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,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),
Expand Down Expand Up @@ -207,9 +207,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
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Application < Rails::Application
config.time_zone = ENV.fetch('RAILS_TIME_ZONE', 'UTC')

# 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]

Expand Down

0 comments on commit 3a02052

Please sign in to comment.