committed by
Pete Matsyburka
parent
972f38242e
commit
b8c29324b8
@@ -37,7 +37,7 @@ class AccountConfigsController < ApplicationController
|
||||
end
|
||||
|
||||
def destroy
|
||||
raise InvalidKey unless allowed_keys.include?(@account_config.key)
|
||||
raise InvalidKey unless allowed_destroy_keys.include?(@account_config.key)
|
||||
|
||||
@account_config.destroy!
|
||||
|
||||
@@ -50,6 +50,10 @@ class AccountConfigsController < ApplicationController
|
||||
ALLOWED_KEYS
|
||||
end
|
||||
|
||||
def allowed_destroy_keys
|
||||
ALLOWED_KEYS
|
||||
end
|
||||
|
||||
def load_account_config
|
||||
raise InvalidKey unless allowed_keys.include?(account_config_params[:key])
|
||||
|
||||
|
||||
@@ -18,6 +18,6 @@ class TemplatesFormPreviewController < ApplicationController
|
||||
@attachments_index = ActiveStorage::Attachment.where(record: @submitter.submission.submitters, name: :attachments)
|
||||
.preload(:blob).index_by(&:uuid)
|
||||
|
||||
@form_configs = Submitters::FormConfigs.call(@submitter)
|
||||
@form_configs = Submitters::FormConfigs.call(@submitter, SubmitFormController::CONFIG_KEYS)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user