provide join_enabled_module for Wiki

This commit is contained in:
Alexander Meindl 2021-05-26 16:55:14 +02:00
parent b6598865ba
commit 75350aeba8

View File

@ -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