E-mail preferences page
This commit is contained in:
parent
9b195f5dd3
commit
7a6d95f70c
13 changed files with 107 additions and 14 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue