0
0
Fork 0

Adding simple_form, adding profile settings, header image

This commit is contained in:
Eugen Rochko 2016-03-12 20:47:22 +01:00
parent 1aa477ac2f
commit 3441361568
21 changed files with 344 additions and 4 deletions

View file

@ -0,0 +1,27 @@
class SettingsController < ApplicationController
layout 'dashboard'
before_action :authenticate_user!
before_action :set_account
def show
end
def update
if @account.update(account_params)
redirect_to settings_path
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