Skip to content

Commit

Permalink
Check :sort_by: :none to keep the field values in the order that they…
Browse files Browse the repository at this point in the history
  • Loading branch information
lfu committed May 3, 2017
1 parent 3f4e382 commit d28172e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/miq_request/_prov_field.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@
- opts = [["<#{_('Choose')}>", nil]]
- else
- opts = multiple ? [] : [["<#{_('None')}>", nil]]
- if field_hash[:data_type] == :integer
- if field_hash[:sort_by] == :none
- opts += Array(field_hash[:values].invert)
- elsif field_hash[:data_type] == :integer
- opts += Array(field_hash[:values].invert).sort_by(&:last)
- else
- opts += Array(field_hash[:values].invert).sort_by { |a| a.first.downcase }
Expand Down

0 comments on commit d28172e

Please sign in to comment.