Sha256: 80d34b21adbb4f0c3333000862c66a4433e41711ee6de4703eba5e87bcb58929

Contents?: true

Size: 601 Bytes

Versions: 4

Compression:

Stored size: 601 Bytes

Contents

require "rodauth/rails/version"
require "rodauth/rails/railtie"

module Rodauth
  module Rails
    class Error < StandardError
    end

    # This allows the developer to avoid loading Rodauth at boot time.
    autoload :App, "rodauth/rails/app"

    def self.configure
      yield self
    end

    @app = nil
    @middleware = true

    class << self
      attr_writer :app
      attr_writer :middleware

      def app
        fail Rodauth::Rails::Error, "app was not configured" unless @app

        @app.constantize
      end

      def middleware?
        @middleware
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rodauth-rails-0.5.0 lib/rodauth/rails.rb
rodauth-rails-0.4.2 lib/rodauth/rails.rb
rodauth-rails-0.4.1 lib/rodauth/rails.rb
rodauth-rails-0.4.0 lib/rodauth/rails.rb