add personalization settings

This commit is contained in:
Alex Turchyn committed 2023-08-16 23:51:55 +03:00
1 parent 545b18086a
commit 187b354605
34 files changed
+244 -60

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
# frozen_string_literal: true
module AccountConfigs
module_function
def find_or_initialize_for_key(account, key)
account.account_configs.find_by(key:) ||
account.account_configs.new(key:, value: AccountConfig::DEFAULT_VALUES[key])
end
end