diff --git a/app/helpers/bulk_time_entries_helper.rb b/app/helpers/bulk_time_entries_helper.rb index d220fab..16e6991 100644 --- a/app/helpers/bulk_time_entries_helper.rb +++ b/app/helpers/bulk_time_entries_helper.rb @@ -23,16 +23,19 @@ def grouped_options_for_issues(issues) html = '' unless open_issues.empty? - html << "" - html << options_from_collection_for_select(open_issues, :id, :to_s) - html << "" + html << labeled_option_group_from_collection_for_select(:label_open_issues, open_issues) end unless closed_issues.empty? - html << "" - html << options_from_collection_for_select(closed_issues, :id, :to_s) - html << "" + html << labeled_option_group_from_collection_for_select(:label_closed_issues, closed_issues) end html end + + def labeled_option_group_from_collection_for_select(label, collection) + html = "" + html << options_from_collection_for_select(collection, :id, :to_s) + html << "" + html + end end