The code powering m.abunchtell.com https://m.abunchtell.com
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 

35 líneas
766 B

  1. # frozen_string_literal: true
  2. class Settings::ProfilesController < ApplicationController
  3. include ObfuscateFilename
  4. layout 'admin'
  5. before_action :authenticate_user!
  6. before_action :set_account
  7. obfuscate_filename [:account, :avatar]
  8. obfuscate_filename [:account, :header]
  9. def show; end
  10. def update
  11. if UpdateAccountService.new.call(@account, account_params)
  12. ActivityPub::UpdateDistributionWorker.perform_async(@account.id)
  13. redirect_to settings_profile_path, notice: I18n.t('generic.changes_saved_msg')
  14. else
  15. render :show
  16. end
  17. end
  18. private
  19. def account_params
  20. params.require(:account).permit(:display_name, :note, :avatar, :header, :locked)
  21. end
  22. def set_account
  23. @account = current_user.account
  24. end
  25. end