mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Change page title based on current page (#269)
This commit is contained in:
committed by
GitHub
parent
a7d67652bf
commit
fadd577db8
@@ -2,6 +2,8 @@ class RegistrationsController < Devise::RegistrationsController
|
||||
# Needed to have Current.tenant available in Devise's controllers
|
||||
prepend_before_action :load_tenant_data
|
||||
before_action :load_oauths, only: [:new]
|
||||
before_action :set_page_title_new, only: [:new]
|
||||
before_action :set_page_title_edit, only: [:edit]
|
||||
|
||||
# Override destroy to soft delete
|
||||
def destroy
|
||||
@@ -12,4 +14,14 @@ class RegistrationsController < Devise::RegistrationsController
|
||||
yield resource if block_given?
|
||||
respond_with_navigational(resource){ redirect_to after_sign_out_path_for(resource_name) }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_page_title_new
|
||||
@page_title = t('common.forms.auth.sign_up')
|
||||
end
|
||||
|
||||
def set_page_title_edit
|
||||
@page_title = t('common.forms.auth.profile_settings')
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user