add base feature specs

This commit is contained in:
Alex Turchyn committed 2023-08-20 15:15:48 +03:00
1 parent 6b4e7c2264
commit cbc6f4497a
32 files changed
+1134 -12

No files matched your search

+9 -5
View File
@@ -21,14 +21,18 @@
# fk_rails_... (account_id => accounts.id)
#
class EncryptedConfig < ApplicationRecord
FILES_STORAGE_KEY = 'active_storage'
EMAIL_SMTP_KEY = 'action_mailer_smtp'
ESIGN_CERTS_KEY = 'esign_certs'
APP_URL_KEY = 'app_url'
WEBHOOK_URL_KEY = 'webhook_url'
CONFIG_KEYS = [
FILES_STORAGE_KEY = 'active_storage',
EMAIL_SMTP_KEY = 'action_mailer_smtp',
ESIGN_CERTS_KEY = 'esign_certs',
APP_URL_KEY = 'app_url',
WEBHOOK_URL_KEY = 'webhook_url'
].freeze
belongs_to :account
validates :key, inclusion: { in: CONFIG_KEYS }
encrypts :value
serialize :value, JSON