Skip to content

Commit

Permalink
Update _form.html.haml: replaced sort_by() by order()
Browse files Browse the repository at this point in the history
  • Loading branch information
mjavurek authored Dec 16, 2024
1 parent 4d12c5c commit a9f631a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/group_order_articles/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
= close_button :modal
%h3= t('.amount_change_for', article: @order_article.article.name)
.modal-body
= form.input :ordergroup_id, as: :select, collection: Ordergroup.undeleted.map { |g| [g.name, g.id] }.sort_by { |name, id| name.downcase }
= form.input :ordergroup_id, as: :select, collection: Ordergroup.undeleted.order(:name).map { |g| [g.name, g.id] }
= form.input :result, hint: I18n.t('group_order_articles.form.result_hint', unit: @order_article.article.unit) # Why do we need the full prefix?
.modal-footer
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
Expand Down

0 comments on commit a9f631a

Please sign in to comment.