Skip to content

Commit

Permalink
Correctly render multi-tags in request details dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
mzazrivec committed Oct 13, 2020
1 parent 9517f7d commit aa67617
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/views/miq_request/_request_dialog_details.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

- when 'DialogFieldTagControl'
- value = wf.value(field.name) || '' # it returns in format Clasification::id
- _, classification_id = value.split('::')
- current_classification = Classification.find_by(:id => classification_id)
= h(current_classification.nil? ? '' : current_classification.description)
- classifications = value.split(',').map { |c| Classification.find_by(:id => c.split('::').second).description }
- if classifications.empty?
= h('')
-else
= h(classifications.join(', '))

0 comments on commit aa67617

Please sign in to comment.