Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint a random file #4002

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions apps/dashboard/app/models/concerns/user_setting_store.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module UserSettingStore
# frozen_string_literal: true

module UserSettingStore
BC_TEMPLATES = :batch_connect_templates

def user_settings
Expand All @@ -23,7 +24,7 @@ def read_user_settings
begin
yml = YAML.safe_load(user_settings_path.read) || {}
user_settings = yml.deep_symbolize_keys
rescue => e
rescue StandardError => e
Rails.logger.error("Can't read or parse settings file: #{user_settings_path} because of error #{e}")
end

Expand All @@ -33,7 +34,7 @@ def read_user_settings
def save_user_settings
# Ensure there is a directory to write the user settings file
user_settings_path.dirname.tap { |p| p.mkpath unless p.exist? }
File.open(user_settings_path.to_s, "w") { |file| file.write(@user_settings.deep_stringify_keys.to_yaml) }
File.open(user_settings_path.to_s, 'w') { |file| file.write(@user_settings.deep_stringify_keys.to_yaml) }
end

def user_settings_path
Expand Down
Loading