Refactor requires login logic, reduce duplicate code
This also corrects the positioning in the chain of the check and removes misuse of prepend_before_action
This commit is contained in:
@@ -4,7 +4,7 @@ require_dependency 'email_updater'
|
||||
|
||||
class UsersEmailController < ApplicationController
|
||||
|
||||
prepend_before_action :check_xhr, :ensure_logged_in, only: [:index, :update]
|
||||
requires_login only: [:index, :update]
|
||||
|
||||
skip_before_action :check_xhr, only: [:confirm]
|
||||
skip_before_action :redirect_to_login_if_required, only: [:confirm]
|
||||
|
||||
Reference in New Issue
Block a user