Sha256: 1a110991001785988ec87f13612fdfbf19bb3b47b6805c03a1d6f209e87b552a
Contents?: true
Size: 615 Bytes
Versions: 29
Compression:
Stored size: 615 Bytes
Contents
module RailsPerformance class BaseController < ActionController::Base layout 'rails_performance/layouts/rails_performance' before_action :verify_access if RailsPerformance.http_basic_authentication_enabled http_basic_authenticate_with \ name: RailsPerformance.http_basic_authentication_user_name, password: RailsPerformance.http_basic_authentication_password end private def verify_access result = RailsPerformance.verify_access_proc.call(self) redirect_to('/', error: 'Access Denied', status: 401) unless result end end end
Version data entries
29 entries across 29 versions & 1 rubygems