add webhook settings
This commit is contained in:
@@ -15,6 +15,8 @@ class Account < ApplicationRecord
|
||||
has_many :users, dependent: :destroy
|
||||
has_many :encrypted_configs, dependent: :destroy
|
||||
has_many :templates, dependent: :destroy
|
||||
has_many :submissions, through: :templates
|
||||
has_many :submitters, through: :submissions
|
||||
has_many :active_users, -> { active }, dependent: :destroy,
|
||||
inverse_of: :account, class_name: 'User'
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ class EncryptedConfig < ApplicationRecord
|
||||
EMAIL_SMTP_KEY = 'action_mailer_smtp'
|
||||
ESIGN_CERTS_KEY = 'esign_certs'
|
||||
APP_URL_KEY = 'app_url'
|
||||
WEBHOOK_URL_KEY = 'webhook_url'
|
||||
|
||||
belongs_to :account
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#
|
||||
class Submission < ApplicationRecord
|
||||
belongs_to :template
|
||||
has_one :account, through: :template
|
||||
belongs_to :created_by_user, class_name: 'User', optional: true
|
||||
|
||||
has_many :submitters, dependent: :destroy
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#
|
||||
class Submitter < ApplicationRecord
|
||||
belongs_to :submission
|
||||
has_one :template, through: :submission
|
||||
has_one :account, through: :template
|
||||
|
||||
attribute :values, :string, default: -> { {} }
|
||||
attribute :slug, :string, default: -> { SecureRandom.base58(14) }
|
||||
|
||||
Reference in New Issue
Block a user