FIX: Incorrect plugin name in `requires_plugin` (#133)

This resulted in `Required plugin 'docs' not found` warnings in logs
This commit is contained in:
Jarek Radosz 2023-05-12 12:54:29 +02:00 committed by GitHub
parent 3f412f3666
commit d4ecda50ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -2,7 +2,7 @@
module Docs
class DocsController < ApplicationController
requires_plugin "docs"
requires_plugin PLUGIN_NAME
skip_before_action :check_xhr, only: [:index]

View File

@ -23,6 +23,10 @@ load File.expand_path("lib/docs/query.rb", __dir__)
GlobalSetting.add_default :docs_path, "docs"
module ::Docs
PLUGIN_NAME = "discourse-docs"
end
after_initialize do
require_dependency "search"