Sha256: 3c1e85557961aa8bd7333904b145e3de8efbea15746372a5a269f90100e2b79f
Contents?: true
Size: 536 Bytes
Versions: 20
Compression:
Stored size: 536 Bytes
Contents
module Maily class ApplicationController < Maily.base_controller.constantize before_action :maily_enabled?, :http_authorization layout 'maily/application' private def maily_enabled? Maily.enabled || head(404, message: "Maily disabled") end def http_authorization if auth_hash = Maily.http_authorization authenticate_or_request_with_http_basic do |username, password| username == auth_hash[:username] && password == auth_hash[:password] end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems