Skip to content

Commit

Permalink
Fix Rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSerth committed Aug 26, 2024
1 parent d15b441 commit 1842cfb
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 @@ -103,7 +103,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 @@ -205,9 +205,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 1842cfb

Please sign in to comment.