We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2719c79 + 07f87c6 commit 4299e79Copy full SHA for 4299e79
README.md
@@ -44,7 +44,7 @@ Set admin username and password in an initializer:
44
# config/initializers/api_doc_server.rb
45
46
ApiDocServer.configure do |config|
47
- config.authentication_proc = proc do |controller|
+ config.authentication_proc = proc
48
authenticate_or_request_with_http_basic do |username, password|
49
User.find_by(name: username, password: password)
50
end
app/controllers/api_doc_server/application_controller.rb
@@ -11,7 +11,7 @@ class ApplicationController < ActionController::Base
11
protected
12
13
def authenticate_admin
14
- ApiDocServer.configuration.authentication_proc.call(self)
+ instance_exec &ApiDocServer.configuration.authentication_proc
15
16
17
0 commit comments