Files
nairobi/app/controllers/account_controller.rb
Alberto Garcia Cabeza c048f25941 Fixes conflicts
2015-08-08 13:28:29 +02:00

27 lines
552 B
Ruby

class AccountController < ApplicationController
before_action :authenticate_user!
before_action :set_account
def show
end
def update
if @account.update(account_params)
redirect_to account_path, notice: t("flash.actions.save_changes.notice")
else
render :show
end
end
private
def set_account
@account = current_user
end
def account_params
params.require(:account).permit(:first_name, :last_name, :nickname, :use_nickname, :email_on_debate_comment, :email_on_comment_reply)
end
end