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