fix problem with asset pipeline https://www.redmine.org/issues/39111 and rubocop fixes
This commit is contained in:
parent
80fff983a4
commit
fa41723c11
@ -31,10 +31,9 @@ module AdditionalsQuery
|
||||
def sql_for_enabled_module(table_field, module_names)
|
||||
module_names = Array module_names
|
||||
|
||||
sql = []
|
||||
module_names.each do |module_name|
|
||||
sql << "EXISTS(SELECT 1 FROM #{EnabledModule.table_name} WHERE #{EnabledModule.table_name}.project_id=#{table_field}" \
|
||||
" AND #{EnabledModule.table_name}.name='#{module_name}')"
|
||||
sql = module_names.map do |module_name|
|
||||
"EXISTS(SELECT 1 FROM #{EnabledModule.table_name} WHERE #{EnabledModule.table_name}.project_id=#{table_field}" \
|
||||
" AND #{EnabledModule.table_name}.name='#{module_name}')"
|
||||
end
|
||||
|
||||
sql.join ' AND '
|
||||
|
2
init.rb
2
init.rb
@ -12,7 +12,7 @@ Redmine::Plugin.register :additionals do
|
||||
version Additionals::PluginVersion::VERSION
|
||||
author_url 'https://alphanodes.com/'
|
||||
url 'https://github.com/alphanodes/additionals'
|
||||
directory __dir__
|
||||
directory File.dirname(__FILE__)
|
||||
|
||||
settings default: loader.default_settings,
|
||||
partial: 'additionals/settings/additionals'
|
||||
|
@ -108,11 +108,7 @@ module Additionals
|
||||
end
|
||||
|
||||
def additionals_library_load(module_names)
|
||||
s = []
|
||||
Array(module_names).each do |module_name|
|
||||
s << send(:"additionals_load_#{module_name}")
|
||||
end
|
||||
safe_join s
|
||||
safe_join(Array(module_names).map { |module_name| send(:"additionals_load_#{module_name}") })
|
||||
end
|
||||
|
||||
def autocomplete_select_entries(name, type, option_tags, **options)
|
||||
|
Loading…
Reference in New Issue
Block a user