Merge pull request #347 from foodcoop1040/suppliers_with_articles
Show only suppliers with articles in the dropdown-menu for new orders
This commit is contained in:
commit
27fe8a4d42
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
||||||
= t '.new_order'
|
= t '.new_order'
|
||||||
%span.caret
|
%span.caret
|
||||||
%ul.dropdown-menu
|
%ul.dropdown-menu
|
||||||
- Supplier.undeleted.order('suppliers.name ASC').each do |supplier|
|
- Supplier.where(id: Article.undeleted.select(:supplier_id).distinct).order('suppliers.name ASC').each do |supplier|
|
||||||
%li= link_to supplier.name, new_order_path(supplier_id: supplier.id), tabindex: -1
|
%li= link_to supplier.name, new_order_path(supplier_id: supplier.id), tabindex: -1
|
||||||
|
|
||||||
.well
|
.well
|
||||||
|
|
Loading…
Reference in a new issue