rename .to_list to .to_comma_list to fix conflict of https://github.com/alphanodes/additional_tags/issues/56

This commit is contained in:
Alexander Meindl 2023-10-18 10:40:49 +02:00
parent 483eb09c62
commit 9235602496
5 changed files with 6 additions and 6 deletions

View File

@ -26,7 +26,7 @@ class AdditionalsChangeStatusController < ApplicationController
if !@issue.save || issue_old_status_id == @issue.status_id if !@issue.save || issue_old_status_id == @issue.status_id
messages = @issue.errors.full_messages messages = @issue.errors.full_messages
flash[:error] = messages.present? ? messages.to_list : l(:error_issue_status_could_not_changed) flash[:error] = messages.present? ? messages.to_comma_list : l(:error_issue_status_could_not_changed)
return redirect_to(issue_path(@issue)) return redirect_to(issue_path(@issue))
end end

View File

@ -12,7 +12,7 @@
.user.line .user.line
= l :field_role = l :field_role
' : ' :
= user_roles[user.id].to_list.html_safe = user_roles[user.id].to_comma_list.html_safe
.user.line .user.line
= l :field_login = l :field_login
' : ' :

View File

@ -198,7 +198,7 @@ end
class Array class Array
# alias for join with ', ' as seperator # alias for join with ', ' as seperator
def to_list def to_comma_list
join ', ' join ', '
end end
end end

View File

@ -42,7 +42,7 @@ module Additionals
def live_search_title_info(entity) def live_search_title_info(entity)
fields = "LiveSearch::#{entity.to_s.classify}".constantize.info_fields fields = "LiveSearch::#{entity.to_s.classify}".constantize.info_fields
all_fields = fields.map { |f| "#{f}:term" }.to_list all_fields = fields.map { |f| "#{f}:term" }.to_comma_list
l :label_live_search_hints, value: all_fields l :label_live_search_hints, value: all_fields
end end

View File

@ -21,10 +21,10 @@ class CoreExtTest < Additionals::TestCase
end end
def test_to_list def test_to_list
assert_equal 'me@localhost, you@localhost', ['me@localhost', 'you@localhost'].to_list assert_equal 'me@localhost, you@localhost', ['me@localhost', 'you@localhost'].to_comma_list
end end
def test_to_list_with_empty_array def test_to_list_with_empty_array
assert_equal '', [].to_list assert_equal '', [].to_comma_list
end end
end end