The code powering m.abunchtell.com https://m.abunchtell.com
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

28 řádky
464 B

  1. class SettingsController < ApplicationController
  2. layout 'auth'
  3. before_action :authenticate_user!
  4. before_action :set_account
  5. def show
  6. end
  7. def update
  8. if @account.update(account_params)
  9. redirect_to settings_path
  10. else
  11. render action: :show
  12. end
  13. end
  14. private
  15. def account_params
  16. params.require(:account).permit(:display_name, :note, :avatar, :header)
  17. end
  18. def set_account
  19. @account = current_user.account
  20. end
  21. end