Skip to content

Commit

Permalink
Fix Rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSerth authored and dependabot[bot] committed Oct 15, 2024
1 parent ffb6dbd commit bde3960
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 @@ -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),
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit bde3960

Please sign in to comment.