Skip to content

Commit

Permalink
fix problem with asset pipeline https://www.redmine.org/issues/39111
Browse files Browse the repository at this point in the history
…and rubocop fixes
  • Loading branch information
alexandermeindl committed Apr 8, 2024
1 parent 80fff98 commit fa41723
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
7 changes: 3 additions & 4 deletions app/models/additionals_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ def available_column_names(only_sortable: false, only_groupable: false, only_tot
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 '
Expand Down
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
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'
Expand Down
6 changes: 1 addition & 5 deletions lib/additionals/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,7 @@ def memberships_new_issue_project_url(user, memberships, permission = :edit_issu
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)
Expand Down

0 comments on commit fa41723

Please sign in to comment.