mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
599 B
26 lines
599 B
class LogosController < ApplicationController
|
|
def create
|
|
authorize! :update, current_account
|
|
|
|
current_account.logo.attach(logo_params[:logo])
|
|
|
|
redirect_back fallback_location: settings_personalization_path,
|
|
notice: I18n.t('settings_have_been_saved')
|
|
end
|
|
|
|
def destroy
|
|
authorize! :update, current_account
|
|
|
|
current_account.logo.purge
|
|
|
|
redirect_back fallback_location: settings_personalization_path,
|
|
notice: I18n.t('settings_have_been_saved')
|
|
end
|
|
|
|
private
|
|
|
|
def logo_params
|
|
params.require(:account_logo).permit(:logo)
|
|
end
|
|
end
|