0
0
Fork 0

E-mail preferences page

This commit is contained in:
Eugen Rochko 2016-10-14 02:28:49 +02:00
parent 9b195f5dd3
commit 7a6d95f70c
13 changed files with 107 additions and 14 deletions

View file

@ -1,27 +0,0 @@
class SettingsController < ApplicationController
layout 'auth'
before_action :authenticate_user!
before_action :set_account
def show
end
def update
if @account.update(account_params)
redirect_to settings_path, notice: 'Changes successfully saved!'
else
render action: :show
end
end
private
def account_params
params.require(:account).permit(:display_name, :note, :avatar, :header)
end
def set_account
@account = current_user.account
end
end