Sha256: b8f5d9446e6ed6b2bbff4ce4c8816b7248fa74fd06b19968459066ae81c1a64a

Contents?: true

Size: 492 Bytes

Versions: 7

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: true

module Archangel
  ##
  # @see Archangel::AuthController
  #
  module Auth
    ##
    # Authentication registrations controller
    #
    class RegistrationsController < Devise::RegistrationsController
      before_action :allow_registration,
                    only: %i[cancel create destroy edit new update]

      protected

      def allow_registration
        return render_404_error unless Archangel.config.allow_registration
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
archangel-0.0.8 app/controllers/archangel/auth/registrations_controller.rb
archangel-0.0.7 app/controllers/archangel/auth/registrations_controller.rb
archangel-0.0.6 app/controllers/archangel/auth/registrations_controller.rb
archangel-0.0.5 app/controllers/archangel/auth/registrations_controller.rb
archangel-0.0.4 app/controllers/archangel/auth/registrations_controller.rb
archangel-0.0.3 app/controllers/archangel/auth/registrations_controller.rb
archangel-0.0.2 app/controllers/archangel/auth/registrations_controller.rb