pushtype/push_type

View on GitHub
auth/app/controllers/concerns/push_type/authentication_methods.rb

Summary

Maintainability
A
0 mins
Test Coverage
module PushType
  module AuthenticationMethods
    extend ActiveSupport::Concern

    included do
      before_action :authenticate_user!
    end

    protected

    def authenticate_user!
      if user_signed_in?
        super
      else
        redirect_to push_type_admin.new_user_session_path, alert: t('devise.failure.unauthenticated')
      end
    end

  end
end