class Rodauth::Rails::Auth

Base auth class that applies some default configuration and supports multi-level inheritance.

Public Class Methods

inherited(auth_class) click to toggle source
Calls superclass method
# File lib/rodauth/rails/auth.rb, line 9
def self.inherited(auth_class)
  super
  superclass = self
  auth_class.class_eval do
    @roda_class = Rodauth::Rails.app
    @features = superclass.features.clone
    @routes = superclass.routes.clone
    @route_hash = superclass.route_hash.clone
    @configuration = superclass.instance_variable_get(:@configuration).clone
    @configuration.instance_variable_set(:@auth, self)
  end
end