From 75350aeba8de896c48a480fc06e1d25c858e4c29 Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Wed, 26 May 2021 16:55:14 +0200 Subject: [PATCH] provide join_enabled_module for Wiki --- lib/additionals/patches/wiki_patch.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/additionals/patches/wiki_patch.rb b/lib/additionals/patches/wiki_patch.rb index d28b20c4..5c1b15ba 100644 --- a/lib/additionals/patches/wiki_patch.rb +++ b/lib/additionals/patches/wiki_patch.rb @@ -15,6 +15,13 @@ module Additionals alias_method :sidebar, :sidebar_with_additionals end + class_methods do + def join_enabled_module + "JOIN #{EnabledModule.table_name} ON #{EnabledModule.table_name}.project_id=#{Wiki.table_name}.project_id" \ + " AND #{EnabledModule.table_name}.name='wiki'" + end + end + module InstanceMethods def sidebar_with_additionals @sidebar ||= find_page 'Sidebar', with_redirect: false