mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Let registrar users change registrar account
This commit is contained in:
parent
207c2a704c
commit
37249a24f7
8 changed files with 104 additions and 9 deletions
|
@ -2,16 +2,23 @@ class Registrar
|
|||
class AccountController < BaseController
|
||||
skip_authorization_check
|
||||
|
||||
helper_method :linked_users
|
||||
def show; end
|
||||
|
||||
def show
|
||||
@user = current_registrar_user
|
||||
def edit
|
||||
@registrar = current_registrar_user.registrar
|
||||
end
|
||||
|
||||
def update
|
||||
@registrar = current_registrar_user.registrar
|
||||
@registrar.update!(registrar_params)
|
||||
|
||||
redirect_to registrar_account_path, notice: t('.saved')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def linked_users
|
||||
current_registrar_user.linked_users
|
||||
def registrar_params
|
||||
params.require(:registrar).permit(:billing_email)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue