mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
Merge pull request #1202 from internetee/improve-registrar-area-account-view
Improve registrar area account view
This commit is contained in:
commit
7b7a87348b
18 changed files with 137 additions and 56 deletions
24
app/controllers/registrar/account_controller.rb
Normal file
24
app/controllers/registrar/account_controller.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
class Registrar
|
||||
class AccountController < BaseController
|
||||
skip_authorization_check
|
||||
|
||||
def show; end
|
||||
|
||||
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 registrar_params
|
||||
params.require(:registrar).permit(:billing_email)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,17 +0,0 @@
|
|||
class Registrar
|
||||
class ProfileController < BaseController
|
||||
skip_authorization_check
|
||||
|
||||
helper_method :linked_users
|
||||
|
||||
def show
|
||||
@user = current_registrar_user
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def linked_users
|
||||
current_registrar_user.linked_users
|
||||
end
|
||||
end
|
||||
end
|
|
@ -182,7 +182,7 @@ class Registrar
|
|||
if can?(:show, :poll)
|
||||
registrar_root_path
|
||||
else
|
||||
registrar_profile_path
|
||||
registrar_account_path
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue