Fix RfC filter for unnamed study groups
This commit is contained in:
@ -16,10 +16,6 @@ class StudyGroup < ApplicationRecord
|
||||
end
|
||||
|
||||
def to_s
|
||||
if name.blank?
|
||||
"StudyGroup " + id.to_s
|
||||
else
|
||||
name
|
||||
end
|
||||
name.presence || "StudyGroup #{id}"
|
||||
end
|
||||
end
|
||||
|
@ -10,7 +10,7 @@ h1 = RequestForComment.model_name.human(count: 2)
|
||||
= f.select(:solved_not_eq, [[t('request_for_comments.show_all'), 2], [t('request_for_comments.show_unsolved'), 1], [t('request_for_comments.show_solved'), 0]])
|
||||
.form-group
|
||||
= f.label(:submission_study_group_id_eq, t('request_for_comments.index.study_groups.placeholder'), class: 'sr-only')
|
||||
= f.grouped_collection_select(:submission_study_group_id_in, @study_groups_grouping, :second, :first, :id, :name, {},
|
||||
= f.grouped_collection_select(:submission_study_group_id_in, @study_groups_grouping, :second, :first, :id, :to_s, {},
|
||||
{ class: 'form-control', multiple: true, "data-placeholder": t('request_for_comments.index.study_groups.placeholder') })
|
||||
|
||||
.table-responsive
|
||||
|
Reference in New Issue
Block a user