Sha256: 613d4583b40f7756ea32ddc88abf2c52c132d5d4c49c9f755bd7015c5c1ec918
Contents?: true
Size: 1.11 KB
Versions: 28
Compression:
Stored size: 1.11 KB
Contents
# frozen_string_literal: true # # Manage the system configuration page # module CoreSystemConfigurationsController include CoreController # # Edit the system configuration # def edit load_configuration end # # Update and log the system configuration changes # def update # @system_configuration.update_attributes_and_log! @current_admin_user, system_configuration_params SystemConfiguration.configuration.update! system_configuration_params flash[:info] = 'System Configuration Updated, sync job running in the background' Cron::SwitchboardSyncConfiguration.perform_later redirect_to index_path rescue StandardError => error log_controller_error error load_configuration render :edit end private # # Get the system configuration properties from the request # def system_configuration_params params[:system_configuration].permit(%i[switchboard_base_url switchboard_stack_id switchboard_stack_api_token]) end # # Load the current system configuration # def load_configuration @system_configuration = SystemConfiguration.configuration end end
Version data entries
28 entries across 28 versions & 1 rubygems